From 672cef89d20c3916135a886a88bf126025da7801 Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Tue, 5 Dec 2023 08:30:11 +0100 Subject: [PATCH] Align maven parameters across GitHub actions (#25117) Closes #25116 Signed-off-by: Alexander Schwartz --- .github/actions/build-keycloak/action.yml | 3 +-- .github/workflows/codeql-analysis.yml | 3 +++ .github/workflows/documentation.yml | 9 +++++---- .github/workflows/guides.yml | 3 +++ .github/workflows/js-ci.yml | 5 ++++- .github/workflows/operator-ci.yml | 5 +++-- .github/workflows/snyk-analysis.yml | 5 ++++- 7 files changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/actions/build-keycloak/action.yml b/.github/actions/build-keycloak/action.yml index 827351e5142..0c8b9279ed3 100644 --- a/.github/actions/build-keycloak/action.yml +++ b/.github/actions/build-keycloak/action.yml @@ -61,8 +61,7 @@ runs: shell: bash # By using "dependency:resolve", it will download all dependencies used in later stages for running the tests run: | - MVN_HTTP_CONFIG="-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120" - ./mvnw install dependency:resolve -nsu -V -B -e -DskipTests -DskipExamples $MVN_HTTP_CONFIG ${{ env.MVN_PROFILES}} + ./mvnw install dependency:resolve -V -e -DskipTests -DskipExamples ${{ env.MVN_PROFILES}} - id: compress-keycloak-maven-repository name: Compress Keycloak Maven artifacts diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2aab95b6542..5ccf0babb30 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,6 +9,9 @@ on: branches: [main] workflow_dispatch: +env: + MAVEN_ARGS: "-B -nsu -Daether.connector.http.connectionMaxTtl=25" + concurrency: # Only cancel jobs for PR updates group: codeql-analysis-${{ github.ref }} diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 25f19458e18..a5e032a9abb 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -8,6 +8,9 @@ on: pull_request: workflow_dispatch: +env: + MAVEN_ARGS: "-B -nsu -Daether.connector.http.connectionMaxTtl=25" + concurrency: # Only cancel jobs for PR updates group: documentation-${{ github.ref }} @@ -52,8 +55,7 @@ jobs: name: Build and verify Keycloak documentation shell: bash run: | - MVN_HTTP_CONFIG="-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120" - ./mvnw install -Dtest=!ExternalLinksTest -am -pl docs/documentation/tests,docs/documentation/dist -nsu -B -e $MVN_HTTP_CONFIG -Pdocumentation + ./mvnw install -Dtest=!ExternalLinksTest -am -pl docs/documentation/tests,docs/documentation/dist -e -Pdocumentation - id: upload-keycloak-documentation name: Upload Keycloak documentation @@ -83,8 +85,7 @@ jobs: name: Build and verify Keycloak documentation shell: bash run: | - MVN_HTTP_CONFIG="-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120" - ./mvnw install -Dtest=ExternalLinksTest -am -pl docs/documentation/tests -nsu -B -e -Pdocumentation $MVN_HTTP_CONFIG + ./mvnw install -Dtest=ExternalLinksTest -am -pl docs/documentation/tests -e -Pdocumentation check: name: Status Check - Keycloak Documentation diff --git a/.github/workflows/guides.yml b/.github/workflows/guides.yml index 4bb752d4133..deaade81a1b 100644 --- a/.github/workflows/guides.yml +++ b/.github/workflows/guides.yml @@ -8,6 +8,9 @@ on: pull_request: workflow_dispatch: +env: + MAVEN_ARGS: "-B -nsu -Daether.connector.http.connectionMaxTtl=25" + concurrency: # Only cancel jobs for PR updates group: guides-${{ github.ref }} diff --git a/.github/workflows/js-ci.yml b/.github/workflows/js-ci.yml index 62f3d28b506..7251b665cb9 100644 --- a/.github/workflows/js-ci.yml +++ b/.github/workflows/js-ci.yml @@ -8,6 +8,9 @@ on: pull_request: workflow_dispatch: +env: + MAVEN_ARGS: "-B -nsu -Daether.connector.http.connectionMaxTtl=25" + concurrency: # Only cancel jobs for PR updates group: js-ci-${{ github.ref }} @@ -49,7 +52,7 @@ jobs: - name: Build Keycloak run: | - ./mvnw clean install --batch-mode --errors -DskipTests -DskipTestsuite -DskipExamples -Pdistribution + ./mvnw clean install --errors -DskipTests -DskipTestsuite -DskipExamples -Pdistribution mv ./quarkus/dist/target/keycloak-999.0.0-SNAPSHOT.tar.gz ./keycloak-999.0.0-SNAPSHOT.tar.gz - name: Upload Keycloak dist diff --git a/.github/workflows/operator-ci.yml b/.github/workflows/operator-ci.yml index 81c7f908655..25d7420ed03 100644 --- a/.github/workflows/operator-ci.yml +++ b/.github/workflows/operator-ci.yml @@ -9,6 +9,7 @@ on: workflow_dispatch: env: + MAVEN_ARGS: "-B -nsu -Daether.connector.http.connectionMaxTtl=25" MINIKUBE_VERSION: v1.31.2 KUBERNETES_VERSION: v1.24.17 # OCP 4.11 @@ -88,7 +89,7 @@ jobs: - name: Test operator running locally run: | - ./mvnw install --batch-mode -Poperator -pl :keycloak-operator -am \ + ./mvnw install -Poperator -pl :keycloak-operator -am \ -Dquarkus.kubernetes.image-pull-policy=IfNotPresent \ -Doperator.keycloak.image=keycloak:${{ env.version_local }} \ -Dtest.operator.custom.image=custom-keycloak:${{ env.version_local }} \ @@ -134,7 +135,7 @@ jobs: - name: Test operator running in cluster run: | eval $(minikube -p minikube docker-env) - ./mvnw install --batch-mode -Poperator -pl :keycloak-operator -am \ + ./mvnw install -Poperator -pl :keycloak-operator -am \ -Dquarkus.container-image.build=true \ -Dquarkus.kubernetes.image-pull-policy=IfNotPresent \ -Doperator.keycloak.image=keycloak:${{ env.version_remote }} \ diff --git a/.github/workflows/snyk-analysis.yml b/.github/workflows/snyk-analysis.yml index 44b416274bb..1b414a5e2ba 100644 --- a/.github/workflows/snyk-analysis.yml +++ b/.github/workflows/snyk-analysis.yml @@ -3,6 +3,9 @@ name: Snyk on: workflow_dispatch: +env: + MAVEN_ARGS: "-B -nsu -Daether.connector.http.connectionMaxTtl=25" + defaults: run: shell: bash @@ -34,7 +37,7 @@ jobs: - name: Check for vulnerabilities in Operator run: | - ./mvnw -Poperator -pl operator -am -DskipTests clean install --batch-mode + ./mvnw -Poperator -pl operator -am -DskipTests clean install snyk test --policy-path=${GITHUB_WORKSPACE}/.github/snyk/.snyk --all-projects --prune-repeated-subdependencies --exclude=tests --sarif-file-output=operator-report.sarif operator continue-on-error: true env: