Как запустить stylelint для CSS на Jenkins во время maven проверки (или хотя бы до sonar:sonar goal)

Мне было интересно, как я могу выполнить анализ во время моей сборки maven.

Я использую плагин maven.

Я попытался установить stylelint во время фазы проверки, которая сработала.

Из моего pom.xml:

<build>
<plugins>
  <plugin>
    <groupId>com.github.eirslett</groupId>
    <artifactId>frontend-maven-plugin</artifactId>
    <version>1.6</version>
    <executions>
      <execution>
        <id>install node and npm</id>
        <goals>
          <goal>install-node-and-npm</goal>
        </goals>
        <configuration>
          <nodeVersion>v10.14.0</nodeVersion>
          <npmVersion>6.4.1</npmVersion>
        </configuration>
      </execution>
      <execution>
        <id>npm install</id>
        <goals>
          <goal>npm</goal>
        </goals>
        <phase>generate-resources</phase>
        <configuration>
          <arguments>install --registry=https://<HIDDEN></arguments>
        </configuration>
      </execution>
      <execution>
        <id>npm run build</id>
        <goals>
          <goal>npm</goal>
        </goals>
        <phase>compile</phase>
        <configuration>
          <arguments>run build</arguments>
        </configuration>
      </execution>
      <!--<execution>
          <id>npm run test</id>
          <goals>
              <goal>npm</goal>
          </goals>
          <phase>test</phase>
          <configuration>
              <arguments>run test</arguments>
          </configuration>
      </execution>-->
      <execution>
        <id>npm run lint</id>
        <goals>
          <goal>npm</goal>
        </goals>
        <phase>verify</phase>
        <configuration>
          <arguments>run lint</arguments>
        </configuration>
      </execution>
      <execution>
        <id>npm install stylelint</id>
        <goals>
          <goal>npm</goal>
        </goals>
        <phase>verify</phase>
        <configuration>
          <arguments>npm install stylelint --save-dev</arguments>
        </configuration>
      </execution>
    </executions>
  </plugin>
</plugins>

Но тогда я понятия не имею, как запустить stylelint на этапе проверки maven, чтобы он генерировал отчет

0 ответов

Другие вопросы по тегам