NIFI-10826 Separated Maven Compile and Verify in ci-workflow

Signed-off-by: Matthew Burgess <mattyb149@apache.org>

This closes #6666
This commit is contained in:
exceptionfactory 2022-11-09 22:11:04 -06:00 committed by Matthew Burgess
parent bd89d66539
commit 9e3987d04e
No known key found for this signature in database
GPG Key ID: 05D3DEB8126DAD24
3 changed files with 77 additions and 17 deletions

View File

@ -25,14 +25,36 @@ env:
-Dorg.slf4j.simpleLogger.defaultLogLevel=WARN -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN
-Dhttp.keepAlive=false -Dhttp.keepAlive=false
-Dmaven.wagon.http.pool=false -Dmaven.wagon.http.pool=false
MAVEN_BUILD_COMMAND: >- COMPILE_MAVEN_OPTS: >-
mvn package verify -Xmx3g
-V -Dhttp.keepAlive=false
-Dmaven.wagon.http.pool=false
MAVEN_COMPILE_COMMAND: >-
mvn compile
--threads 2C
--show-version
--no-snapshot-updates
--no-transfer-progress
--fail-fast
-pl -:nifi-assembly
-pl -:nifi-kafka-connector-assembly
-pl -:nifi-kafka-connector-tests
-pl -:nifi-toolkit-encrypt-config
-pl -:nifi-toolkit-admin
-pl -:nifi-toolkit-tls
-pl -:nifi-toolkit-assembly
-pl -:nifi-registry-assembly
-pl -:nifi-registry-toolkit-assembly
-pl -:nifi-runtime-manifest
-pl -:nifi-runtime-manifest-test
MAVEN_VERIFY_COMMAND: >-
mvn verify
--show-version
--no-snapshot-updates
--no-transfer-progress
--fail-fast
-D dir-only -D dir-only
-D disableXmlReport -D disableXmlReport
-nsu
-ntp
-ff
MAVEN_BUILD_PROFILES: >- MAVEN_BUILD_PROFILES: >-
-P include-grpc -P include-grpc
-P skip-nifi-bin-assembly -P skip-nifi-bin-assembly
@ -107,7 +129,13 @@ jobs:
distribution: 'zulu' distribution: 'zulu'
java-version: '17' java-version: '17'
cache: 'maven' cache: 'maven'
- name: Maven Build - name: Maven Compile
env:
MAVEN_OPTS: >-
${{ env.COMPILE_MAVEN_OPTS }}
run: >
${{ env.MAVEN_COMPILE_COMMAND }}
- name: Maven Verify
env: env:
NIFI_CI_LOCALE: >- NIFI_CI_LOCALE: >-
-Duser.language=en -Duser.language=en
@ -121,7 +149,7 @@ jobs:
${{ env.DEFAULT_MAVEN_OPTS }} ${{ env.DEFAULT_MAVEN_OPTS }}
-DargLine=${env.SUREFIRE_OPTS} -DargLine=${env.SUREFIRE_OPTS}
run: > run: >
${{ env.MAVEN_BUILD_COMMAND }} ${{ env.MAVEN_VERIFY_COMMAND }}
${{ env.MAVEN_BUILD_PROFILES }} ${{ env.MAVEN_BUILD_PROFILES }}
${{ env.MAVEN_PROJECTS }} ${{ env.MAVEN_PROJECTS }}
- name: Upload Test Reports - name: Upload Test Reports
@ -162,7 +190,13 @@ jobs:
distribution: 'zulu' distribution: 'zulu'
java-version: '11' java-version: '11'
cache: 'maven' cache: 'maven'
- name: Maven Build - name: Maven Compile
env:
MAVEN_OPTS: >-
${{ env.COMPILE_MAVEN_OPTS }}
run: >
${{ env.MAVEN_COMPILE_COMMAND }}
- name: Maven Verify
env: env:
NIFI_CI_LOCALE: >- NIFI_CI_LOCALE: >-
-Duser.language=hi -Duser.language=hi
@ -176,7 +210,7 @@ jobs:
${{ env.DEFAULT_MAVEN_OPTS }} ${{ env.DEFAULT_MAVEN_OPTS }}
-DargLine=${env.SUREFIRE_OPTS} -DargLine=${env.SUREFIRE_OPTS}
run: > run: >
${{ env.MAVEN_BUILD_COMMAND }} ${{ env.MAVEN_VERIFY_COMMAND }}
${{ env.MAVEN_BUILD_PROFILES }} ${{ env.MAVEN_BUILD_PROFILES }}
${{ env.MAVEN_PROJECTS }} ${{ env.MAVEN_PROJECTS }}
- name: Upload Test Reports - name: Upload Test Reports
@ -217,7 +251,13 @@ jobs:
distribution: 'temurin' distribution: 'temurin'
java-version: '8' java-version: '8'
cache: 'maven' cache: 'maven'
- name: Maven Build - name: Maven Compile
env:
MAVEN_OPTS: >-
${{ env.COMPILE_MAVEN_OPTS }}
run: >
${{ env.MAVEN_COMPILE_COMMAND }}
- name: Maven Verify
env: env:
NIFI_CI_LOCALE: >- NIFI_CI_LOCALE: >-
-Duser.language=ja -Duser.language=ja
@ -231,7 +271,7 @@ jobs:
${{ env.DEFAULT_MAVEN_OPTS }} ${{ env.DEFAULT_MAVEN_OPTS }}
-DargLine=${env.SUREFIRE_OPTS} -DargLine=${env.SUREFIRE_OPTS}
run: >- run: >-
${{ env.MAVEN_BUILD_COMMAND }} ${{ env.MAVEN_VERIFY_COMMAND }}
${{ env.MAVEN_BUILD_PROFILES }} ${{ env.MAVEN_BUILD_PROFILES }}
${{ env.MAVEN_PROJECTS }} ${{ env.MAVEN_PROJECTS }}
- name: Upload Test Reports - name: Upload Test Reports
@ -274,7 +314,13 @@ jobs:
distribution: 'zulu' distribution: 'zulu'
java-version: '8' java-version: '8'
cache: 'maven' cache: 'maven'
- name: Maven Build - name: Maven Compile
env:
MAVEN_OPTS: >-
${{ env.COMPILE_MAVEN_OPTS }}
run: >
${{ env.MAVEN_COMPILE_COMMAND }}
- name: Maven Verify
env: env:
NIFI_CI_LOCALE: >- NIFI_CI_LOCALE: >-
-Duser.language=fr -Duser.language=fr
@ -288,7 +334,7 @@ jobs:
${{ env.DEFAULT_MAVEN_OPTS }} ${{ env.DEFAULT_MAVEN_OPTS }}
-DargLine=${env.SUREFIRE_OPTS} -DargLine=${env.SUREFIRE_OPTS}
run: >- run: >-
${{ env.MAVEN_BUILD_COMMAND }} ${{ env.MAVEN_VERIFY_COMMAND }}
${{ env.MAVEN_BUILD_PROFILES }} ${{ env.MAVEN_BUILD_PROFILES }}
${{ env.MAVEN_PROJECTS }} ${{ env.MAVEN_PROJECTS }}
- name: Upload Test Reports - name: Upload Test Reports

View File

@ -31,13 +31,27 @@
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>default-jar</id>
<phase>compile</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version> <version>3.2.4</version>
<executions> <executions>
<execution> <execution>
<phase>package</phase> <phase>compile</phase>
<goals> <goals>
<goal>shade</goal> <goal>shade</goal>
</goals> </goals>

View File

@ -93,7 +93,7 @@
<executions> <executions>
<execution> <execution>
<id>unpack-rest-api-doc</id> <id>unpack-rest-api-doc</id>
<phase>compile</phase> <phase>prepare-package</phase>
<goals> <goals>
<goal>unpack-dependencies</goal> <goal>unpack-dependencies</goal>
</goals> </goals>
@ -118,7 +118,7 @@
<executions> <executions>
<execution> <execution>
<id>copy-rest-api-doc</id> <id>copy-rest-api-doc</id>
<phase>compile</phase> <phase>prepare-package</phase>
<goals> <goals>
<goal>run</goal> <goal>run</goal>
</goals> </goals>