From 9e3987d04e78148a36c46f42a451290fe5813061 Mon Sep 17 00:00:00 2001 From: exceptionfactory Date: Wed, 9 Nov 2022 22:11:04 -0600 Subject: [PATCH] NIFI-10826 Separated Maven Compile and Verify in ci-workflow Signed-off-by: Matthew Burgess This closes #6666 --- .github/workflows/ci-workflow.yml | 74 +++++++++++++++---- nifi-h2/nifi-h2-database/pom.xml | 16 +++- .../nifi-registry-docs/pom.xml | 4 +- 3 files changed, 77 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 4f529164af..31dac1fec5 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -25,14 +25,36 @@ env: -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false - MAVEN_BUILD_COMMAND: >- - mvn package verify - -V + COMPILE_MAVEN_OPTS: >- + -Xmx3g + -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 disableXmlReport - -nsu - -ntp - -ff MAVEN_BUILD_PROFILES: >- -P include-grpc -P skip-nifi-bin-assembly @@ -107,7 +129,13 @@ jobs: distribution: 'zulu' java-version: '17' cache: 'maven' - - name: Maven Build + - name: Maven Compile + env: + MAVEN_OPTS: >- + ${{ env.COMPILE_MAVEN_OPTS }} + run: > + ${{ env.MAVEN_COMPILE_COMMAND }} + - name: Maven Verify env: NIFI_CI_LOCALE: >- -Duser.language=en @@ -121,7 +149,7 @@ jobs: ${{ env.DEFAULT_MAVEN_OPTS }} -DargLine=${env.SUREFIRE_OPTS} run: > - ${{ env.MAVEN_BUILD_COMMAND }} + ${{ env.MAVEN_VERIFY_COMMAND }} ${{ env.MAVEN_BUILD_PROFILES }} ${{ env.MAVEN_PROJECTS }} - name: Upload Test Reports @@ -162,7 +190,13 @@ jobs: distribution: 'zulu' java-version: '11' cache: 'maven' - - name: Maven Build + - name: Maven Compile + env: + MAVEN_OPTS: >- + ${{ env.COMPILE_MAVEN_OPTS }} + run: > + ${{ env.MAVEN_COMPILE_COMMAND }} + - name: Maven Verify env: NIFI_CI_LOCALE: >- -Duser.language=hi @@ -176,7 +210,7 @@ jobs: ${{ env.DEFAULT_MAVEN_OPTS }} -DargLine=${env.SUREFIRE_OPTS} run: > - ${{ env.MAVEN_BUILD_COMMAND }} + ${{ env.MAVEN_VERIFY_COMMAND }} ${{ env.MAVEN_BUILD_PROFILES }} ${{ env.MAVEN_PROJECTS }} - name: Upload Test Reports @@ -217,7 +251,13 @@ jobs: distribution: 'temurin' java-version: '8' cache: 'maven' - - name: Maven Build + - name: Maven Compile + env: + MAVEN_OPTS: >- + ${{ env.COMPILE_MAVEN_OPTS }} + run: > + ${{ env.MAVEN_COMPILE_COMMAND }} + - name: Maven Verify env: NIFI_CI_LOCALE: >- -Duser.language=ja @@ -231,7 +271,7 @@ jobs: ${{ env.DEFAULT_MAVEN_OPTS }} -DargLine=${env.SUREFIRE_OPTS} run: >- - ${{ env.MAVEN_BUILD_COMMAND }} + ${{ env.MAVEN_VERIFY_COMMAND }} ${{ env.MAVEN_BUILD_PROFILES }} ${{ env.MAVEN_PROJECTS }} - name: Upload Test Reports @@ -274,7 +314,13 @@ jobs: distribution: 'zulu' java-version: '8' cache: 'maven' - - name: Maven Build + - name: Maven Compile + env: + MAVEN_OPTS: >- + ${{ env.COMPILE_MAVEN_OPTS }} + run: > + ${{ env.MAVEN_COMPILE_COMMAND }} + - name: Maven Verify env: NIFI_CI_LOCALE: >- -Duser.language=fr @@ -288,7 +334,7 @@ jobs: ${{ env.DEFAULT_MAVEN_OPTS }} -DargLine=${env.SUREFIRE_OPTS} run: >- - ${{ env.MAVEN_BUILD_COMMAND }} + ${{ env.MAVEN_VERIFY_COMMAND }} ${{ env.MAVEN_BUILD_PROFILES }} ${{ env.MAVEN_PROJECTS }} - name: Upload Test Reports diff --git a/nifi-h2/nifi-h2-database/pom.xml b/nifi-h2/nifi-h2-database/pom.xml index a16bcbaef7..09fa0842ae 100644 --- a/nifi-h2/nifi-h2-database/pom.xml +++ b/nifi-h2/nifi-h2-database/pom.xml @@ -31,13 +31,27 @@ + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + default-jar + compile + + jar + + + + org.apache.maven.plugins maven-shade-plugin 3.2.4 - package + compile shade diff --git a/nifi-registry/nifi-registry-core/nifi-registry-docs/pom.xml b/nifi-registry/nifi-registry-core/nifi-registry-docs/pom.xml index e85b6ec556..ac8f13de66 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-docs/pom.xml +++ b/nifi-registry/nifi-registry-core/nifi-registry-docs/pom.xml @@ -93,7 +93,7 @@ unpack-rest-api-doc - compile + prepare-package unpack-dependencies @@ -118,7 +118,7 @@ copy-rest-api-doc - compile + prepare-package run