From d718c0f76612c960c31d543da5a896cdc2976475 Mon Sep 17 00:00:00 2001 From: Wolfram Gulde Date: Tue, 1 Mar 2022 15:13:39 +0100 Subject: [PATCH 1/4] docs(Docs): Publish CI Tempaltes as own chapters --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3fa8d52..2a68590 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,11 +23,11 @@ check_confluence_validity: INPUT_FILE: "document.adoc" IMAGES_DIR: images CREATE_SUB_PAGES: "false" - PAGE_PREFIX: "[CI/CD] - [TMPL] - " + PAGE_PREFIX: "[CI/CD] - " CONFLUENCE_SPACE: RANDI TEXT_GENERATED_HINT: 'This is a generated page, do not edit! All changes must happen in the Repository .' - FILE_INPUT: "index.html,111183157,gitlab-ci-templates" + FILE_INPUT: "index.html,107524048,CI Templates" extends: .check_confluence_validity-template pages: @@ -36,11 +36,11 @@ pages: INPUT_FILE: "document.adoc" IMAGES_DIR: images CREATE_SUB_PAGES: "false" - PAGE_PREFIX: "[CI/CD] - [TMPL] - " + PAGE_PREFIX: "[CI/CD] - " CONFLUENCE_SPACE: RANDI TEXT_GENERATED_HINT: 'This is a generated page, do not edit! All changes must happen in the Repository .' - FILE_INPUT: "index.html,111183157,gitlab-ci-templates" + FILE_INPUT: "index.html,107524048,CI Templates" extends: .pages-template .release-template: From 2152cb69640282b5c145150700f5d59771dffab7 Mon Sep 17 00:00:00 2001 From: Wolfram Gulde Date: Tue, 1 Mar 2022 16:37:06 +0100 Subject: [PATCH 2/4] docs(opts): add gradle CLI opts --- container-publish.gitlab-ci.yml | 2 +- container-scan.gitlab-ci.yml | 2 +- gradle-test-template.gitlab-ci.yml | 2 +- tool-sonar7.gitlab-ci.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/container-publish.gitlab-ci.yml b/container-publish.gitlab-ci.yml index 7bd7374..b3973f9 100644 --- a/container-publish.gitlab-ci.yml +++ b/container-publish.gitlab-ci.yml @@ -46,7 +46,7 @@ EXTRA_ARGS: $GRADLE_EXTRA_ARGS script: - echo $PARSED_VERSION - - ./gradlew assemble jib $EXTRA_ARGS + - ./gradlew assemble jib $GRADLE_CLI_OPTS $EXTRA_ARGS "-DskipTests" "-Djib.to.image=$DOCKER_REGISTRY:$PARSED_VERSION"" "-Djib.to.auth.username=$DOCKER_REGISTRY_USER" diff --git a/container-scan.gitlab-ci.yml b/container-scan.gitlab-ci.yml index b4c9330..dd171d8 100644 --- a/container-scan.gitlab-ci.yml +++ b/container-scan.gitlab-ci.yml @@ -32,7 +32,7 @@ - curl -L "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" --output trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz - tar zxvf trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz script: - - ./gradlew jibBuildTar -DskipTests + - ./gradlew $GRADLE_CLI_OPTS jibBuildTar -DskipTests - ./trivy --cache-dir .trivycache/ image --timeout 15m $TRIVY_EXTRA_ARGS --exit-code 0 --severity HIGH,CRITICAL --format template --template "@contrib/junit.tpl" -o junit-report.xml --input $PROJECT_DIR/jib-image.tar - ./trivy --cache-dir .trivycache/ image --timeout 15m $TRIVY_EXTRA_ARGS --exit-code $EXITCODE --severity HIGH,CRITICAL --input $PROJECT_DIR/jib-image.tar cache: diff --git a/gradle-test-template.gitlab-ci.yml b/gradle-test-template.gitlab-ci.yml index 9115033..ca83ff4 100644 --- a/gradle-test-template.gitlab-ci.yml +++ b/gradle-test-template.gitlab-ci.yml @@ -2,7 +2,7 @@ image: $GRADLE_IMAGE stage: test script: - - "./gradlew --build-cache test" + - "./gradlew --build-cache test $GRADLE_CLI_OPTS" artifacts: expire_in: 2 weeks reports: diff --git a/tool-sonar7.gitlab-ci.yml b/tool-sonar7.gitlab-ci.yml index 2cd5c00..748ed22 100644 --- a/tool-sonar7.gitlab-ci.yml +++ b/tool-sonar7.gitlab-ci.yml @@ -27,7 +27,7 @@ extends: .sonar-template-common image: $GRADLE_IMAGE script: - - ./gradlew $GRADLE_OPTS sonarqube + - ./gradlew $GRADLE_OPTS sonarqube $GRADLE_CLI_OPTS "-Dsonar.host.url=$SONAR_HOST_URL" "-Dsonar.login=$SONAR_TOKEN" "-Dsonar.projectKey=$SONAR_PROJECT_KEY" From f86c01df17a2ff729b55e5f3b89cf10b8d6fbaf5 Mon Sep 17 00:00:00 2001 From: Wolfram Gulde Date: Tue, 1 Mar 2022 17:16:58 +0100 Subject: [PATCH 3/4] docs(opts): add gradle CLI opts in docs --- documentation/chapters/templates/container-publish.adoc | 1 + documentation/chapters/templates/container-scan.adoc | 1 + documentation/chapters/templates/gradle-build-template.adoc | 1 + documentation/chapters/templates/gradle-test-template.adoc | 1 + documentation/chapters/templates/tool-sonar7.adoc | 1 + 5 files changed, 5 insertions(+) diff --git a/documentation/chapters/templates/container-publish.adoc b/documentation/chapters/templates/container-publish.adoc index f29f243..e39c3c0 100644 --- a/documentation/chapters/templates/container-publish.adoc +++ b/documentation/chapters/templates/container-publish.adoc @@ -19,6 +19,7 @@ Falls das Projekt aus mehreren Poms besteht, kann `before_script:` benutzt werde |EXTRA_ARGS | Weitere Argumente die an den jeweiligen Job gegeben werden sollen. | "" |USE_VERSIONFILE | Wenn true, dann wird zur Versionierung das ./version file aus dem set-version tool verwendet | "false" |ARTIFACT | Der Name des Versionfiles aus dem set-version tool | "version" +|GRADLE_CLI_OPTS | Zusätzliche CLI Opts für Gradle | "" |=== .container-publish diff --git a/documentation/chapters/templates/container-scan.adoc b/documentation/chapters/templates/container-scan.adoc index 4baaabe..494792c 100644 --- a/documentation/chapters/templates/container-scan.adoc +++ b/documentation/chapters/templates/container-scan.adoc @@ -22,6 +22,7 @@ Benutzte `allow_failure: true` damit die CI weiter läuft aber ein Failure angez Wenn 0 benutzt wird, läuft die CI weiter. Benutzte `allow_failure: true` damit die CI weiter läuft aber ein Failure angezeigt wird. | - +|GRADLE_CLI_OPTS | Zusätzliche CLI Opts für Gradle | "" |=== .container scan template diff --git a/documentation/chapters/templates/gradle-build-template.adoc b/documentation/chapters/templates/gradle-build-template.adoc index 0f45d65..11ccecf 100644 --- a/documentation/chapters/templates/gradle-build-template.adoc +++ b/documentation/chapters/templates/gradle-build-template.adoc @@ -8,6 +8,7 @@ Die Ergebnisse werden als Artifact gespeichert. .Variables |=== |Name |Description | Default Value +|GRADLE_CLI_OPTS | Zusätzliche CLI Opts für Gradle | "" |=== .gradle-build-template diff --git a/documentation/chapters/templates/gradle-test-template.adoc b/documentation/chapters/templates/gradle-test-template.adoc index 85e353f..b609da1 100644 --- a/documentation/chapters/templates/gradle-test-template.adoc +++ b/documentation/chapters/templates/gradle-test-template.adoc @@ -8,6 +8,7 @@ Die Ergebnisse werden als Artifact gespeichert. .Variables |=== |Name |Description | Default Value +|GRADLE_CLI_OPTS | Zusätzliche CLI Opts für Gradle | "" |=== .gradle-test-template diff --git a/documentation/chapters/templates/tool-sonar7.adoc b/documentation/chapters/templates/tool-sonar7.adoc index 6709ba9..9d043a5 100644 --- a/documentation/chapters/templates/tool-sonar7.adoc +++ b/documentation/chapters/templates/tool-sonar7.adoc @@ -23,6 +23,7 @@ Du musst das Plugin in deinen Abhängigkeiten installiert haben. |SONAR_SKIP_BUILD_BREAKER | Definiert ob der Build Breaker übersprungen werden soll | "true" |SONAR_QUERY_MAX_ATTEMPTS_BUILD_BREAKER | Maximale Anzahl an Anfragen, um den Sonar-Report zu erhalten | "30" |SONAR_QUERY_INTERVAL_BUILD_BREAKER | Zeit in Millisekunden zwischen 2 Anfragen, um den Sonar-Report zu erhalten | "10000" +|GRADLE_CLI_OPTS | Zusätzliche CLI Opts für Gradle | "" |=== From 4d780131c0e5481ea8328af4ce187d89524b3f90 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 3 Mar 2022 14:04:31 +0000 Subject: [PATCH 4/4] chore(deps): update dependency aquasecurity/trivy to v0.24.2 --- container-scan.gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/container-scan.gitlab-ci.yml b/container-scan.gitlab-ci.yml index dd171d8..a08a630 100644 --- a/container-scan.gitlab-ci.yml +++ b/container-scan.gitlab-ci.yml @@ -2,7 +2,7 @@ image: $MAVEN_IMAGE stage: test variables: - TRIVY_VERSION: 0.24.1 + TRIVY_VERSION: 0.24.2 EXITCODE: 1 TRIVY_EXTRA_ARGS: "--no-progress --ignore-unfixed" before_script: @@ -23,7 +23,7 @@ image: $GRADLE_IMAGE stage: test variables: - TRIVY_VERSION: 0.24.1 + TRIVY_VERSION: 0.24.2 EXITCODE: 1 PROJECT_DIR: $CI_PROJECT_DIR/build TRIVY_EXTRA_ARGS: "--no-progress --ignore-unfixed" @@ -48,7 +48,7 @@ name: gcr.io/kaniko-project/executor:debug entrypoint: [ "" ] variables: - TRIVY_VERSION: 0.24.1 + TRIVY_VERSION: 0.24.2 PROJECT_DIR: $CI_PROJECT_DIR DOCKERFILE_LOCATION: $CI_PROJECT_DIR/Dockerfile CONTEXT_LOCATION: $CI_PROJECT_DIR