This is an automated email from the ASF dual-hosted git repository.
greyp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new eb91eb12b0 NIFI-10224 Moved GitHub Workflow Analysis to Separate Job
eb91eb12b0 is described below
commit eb91eb12b04ca35aeb69b8c576d576998b0df87f
Author: exceptionfactory <[email protected]>
AuthorDate: Tue Jul 12 16:08:36 2022 -0500
NIFI-10224 Moved GitHub Workflow Analysis to Separate Job
- Upgraded multiple GitHub Actions from Version 2 to 3
- Replaced Maven Cache step with cache feature in Setup Java Action
- Moved checkstyle and license checks from verify to validate phase in
Maven execution
- Removed unnecessary contrib-check profile from nifi-registry
This closes #6202
Signed-off-by: Paul Grey <[email protected]>
---
.github/workflows/ci-workflow.yml | 114 ++++++++++++++++++--------------------
nifi-registry/pom.xml | 38 -------------
pom.xml | 4 +-
3 files changed, 56 insertions(+), 100 deletions(-)
diff --git a/.github/workflows/ci-workflow.yml
b/.github/workflows/ci-workflow.yml
index c3e7ee7728..7511137136 100644
--- a/.github/workflows/ci-workflow.yml
+++ b/.github/workflows/ci-workflow.yml
@@ -25,7 +25,7 @@ env:
-Dorg.slf4j.simpleLogger.defaultLogLevel=WARN
-Dhttp.keepAlive=false
-Dmaven.wagon.http.pool=false
- MAVEN_COMMAND: >-
+ MAVEN_BUILD_COMMAND: >-
mvn package verify
-V
-D dir-only
@@ -33,8 +33,7 @@ env:
-nsu
-ntp
-ff
- MAVEN_PROFILES: >-
- -P contrib-check
+ MAVEN_BUILD_PROFILES: >-
-P include-grpc
-P skip-nifi-bin-assembly
MAVEN_PROJECTS: >-
@@ -51,6 +50,28 @@ concurrency:
cancel-in-progress: true
jobs:
+ static-analysis:
+ timeout-minutes: 30
+ name: Static Analysis
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v3
+ - name: Set up Java 17
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'zulu'
+ java-version: '17'
+ cache: 'maven'
+ - name: Maven Build
+ run: >
+ mvn validate
+ --no-snapshot-updates
+ --no-transfer-progress
+ --fail-fast
+ -P contrib-check
+ -P include-grpc
+
ubuntu-build-en:
timeout-minutes: 120
runs-on: ubuntu-latest
@@ -63,17 +84,9 @@ jobs:
cat /proc/meminfo
df
- name: Checkout Code
- uses: actions/checkout@v2
- - name: Cache Maven Dependencies
- uses: actions/cache@v2
- with:
- path: |
- ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-
+ uses: actions/checkout@v3
- name: Cache Node Modules
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: |
~/.npm
@@ -82,10 +95,11 @@ jobs:
restore-keys: |
${{ runner.os }}-npm16-
- name: Set up Java 17
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
+ cache: 'maven'
- name: Maven Build
env:
NIFI_CI_LOCALE: >-
@@ -100,11 +114,11 @@ jobs:
${{ env.DEFAULT_MAVEN_OPTS }}
-DargLine=${env.SUREFIRE_OPTS}
run: >
- ${{ env.MAVEN_COMMAND }}
- ${{ env.MAVEN_PROFILES }}
+ ${{ env.MAVEN_BUILD_COMMAND }}
+ ${{ env.MAVEN_BUILD_PROFILES }}
${{ env.MAVEN_PROJECTS }}
- name: Upload Test Reports
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: surefire-reports-ubuntu-17
path: |
@@ -127,17 +141,9 @@ jobs:
cat /proc/meminfo
df
- name: Checkout Code
- uses: actions/checkout@v2
- - name: Cache Maven Dependencies
- uses: actions/cache@v2
- with:
- path: |
- ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-
+ uses: actions/checkout@v3
- name: Cache Node Modules
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: |
~/.npm
@@ -146,10 +152,11 @@ jobs:
restore-keys: |
${{ runner.os }}-npm16-
- name: Set up Java 11
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
+ cache: 'maven'
- name: Maven Build
env:
NIFI_CI_LOCALE: >-
@@ -164,11 +171,11 @@ jobs:
${{ env.DEFAULT_MAVEN_OPTS }}
-DargLine=${env.SUREFIRE_OPTS}
run: >
- ${{ env.MAVEN_COMMAND }}
- ${{ env.MAVEN_PROFILES }}
+ ${{ env.MAVEN_BUILD_COMMAND }}
+ ${{ env.MAVEN_BUILD_PROFILES }}
${{ env.MAVEN_PROJECTS }}
- name: Upload Test Reports
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: surefire-reports-ubuntu-en
path: |
@@ -182,7 +189,7 @@ jobs:
macos-build-jp:
timeout-minutes: 120
runs-on: macos-latest
- name: MacOS Adopt JDK 8 JP
+ name: MacOS Temurin JDK 8 JP
steps:
- name: System Information
run: |
@@ -191,17 +198,9 @@ jobs:
sysctl machdep.cpu
df
- name: Checkout Code
- uses: actions/checkout@v2
- - name: Cache Maven Dependencies
- uses: actions/cache@v2
- with:
- path: |
- ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-
+ uses: actions/checkout@v3
- name: Cache Node Modules
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: |
~/.npm
@@ -210,10 +209,11 @@ jobs:
restore-keys: |
${{ runner.os }}-npm16-
- name: Set up Java 8
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v3
with:
- distribution: 'adopt'
+ distribution: 'temurin'
java-version: '8'
+ cache: 'maven'
- name: Maven Build
env:
NIFI_CI_LOCALE: >-
@@ -228,11 +228,11 @@ jobs:
${{ env.DEFAULT_MAVEN_OPTS }}
-DargLine=${env.SUREFIRE_OPTS}
run: >-
- ${{ env.MAVEN_COMMAND }}
- ${{ env.MAVEN_PROFILES }}
+ ${{ env.MAVEN_BUILD_COMMAND }}
+ ${{ env.MAVEN_BUILD_PROFILES }}
${{ env.MAVEN_PROJECTS }}
- name: Upload Test Reports
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: surefire-reports-macos-jp
path: |
@@ -257,21 +257,13 @@ jobs:
git config --global core.autocrlf false
git config --global core.longpaths true
- name: Checkout Code
- uses: actions/checkout@v2
- - name: Cache Maven Dependencies
- uses: actions/cache@v2
- with:
- path: |
- ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-
+ uses: actions/checkout@v3
- name: Get NPM Cache Directory
id: npm-cache-directory
run: |
echo "::set-output name=directory::$(npm config get cache)"
- name: Cache Node Modules
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: |
${{ steps.npm-cache-directory.outputs.directory }}
@@ -280,10 +272,11 @@ jobs:
restore-keys: |
${{ runner.os }}-npm16-
- name: Set up Java 8
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
+ cache: 'maven'
- name: Maven Build
env:
NIFI_CI_LOCALE: >-
@@ -298,10 +291,11 @@ jobs:
${{ env.DEFAULT_MAVEN_OPTS }}
-DargLine=${env.SUREFIRE_OPTS}
run: >-
- ${{ env.MAVEN_COMMAND }}
+ ${{ env.MAVEN_BUILD_COMMAND }}
+ ${{ env.MAVEN_BUILD_PROFILES }}
${{ env.MAVEN_PROJECTS }}
- name: Upload Test Reports
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: surefire-reports-windows-fr
path: |
diff --git a/nifi-registry/pom.xml b/nifi-registry/pom.xml
index 6947443fee..da9eeab651 100644
--- a/nifi-registry/pom.xml
+++ b/nifi-registry/pom.xml
@@ -452,44 +452,6 @@
</plugins>
</build>
</profile>
- <profile>
- <!-- Checks style and licensing requirements. This is a good idea
to run
- for contributions and for the release process. While it would be
nice to
- run always these plugins can considerably slow the build and have
proven
- to create unstable builds in our multi-module project and when
building using
- multiple threads. The stability issues seen with Checkstyle in
multi-module
- builds include false-positives and false negatives. -->
- <id>contrib-check</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>check</goal>
- </goals>
- <phase>verify</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <executions>
- <execution>
- <id>check-style</id>
- <goals>
- <goal>check</goal>
- </goals>
- <phase>verify</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
<profile>
<!-- Enables execution of integration tests managed by the Maven
FailSafe plugin. -->
<id>nifi-registry-integration-tests</id>
diff --git a/pom.xml b/pom.xml
index 60fe64602a..e94680a5d0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -992,7 +992,7 @@
<goals>
<goal>check</goal>
</goals>
- <phase>verify</phase>
+ <phase>validate</phase>
</execution>
</executions>
</plugin>
@@ -1002,7 +1002,7 @@
<executions>
<execution>
<id>check-style</id>
- <phase>verify</phase>
+ <phase>validate</phase>
<configuration>
<encoding>UTF-8</encoding>
<excludes>**/generated-sources/**/*</excludes>