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/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 | "" |=== 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"