diff --git a/templates/container/container-build.gitlab-ci.yml b/templates/container/container-build.gitlab-ci.yml index faa3c10..5540863 100644 --- a/templates/container/container-build.gitlab-ci.yml +++ b/templates/container/container-build.gitlab-ci.yml @@ -27,7 +27,7 @@ if [ "$CONTEXT_LOCATION" != "" ]; then cd $CONTEXT_LOCATION fi - - ./gradlew $GRADLE_CLI_OPTS jibBuildTar -DskipTests -Djib.outputPaths.tar=$CI_PROJECT_DIR/image.tar $EXTRA_ARGS + - ./gradlew --build-cache $GRADLE_OPTS $GRADLE_CLI_OPTS jibBuildTar -DskipTests -Djib.outputPaths.tar=$CI_PROJECT_DIR/image.tar $EXTRA_ARGS .container-build-kaniko: extends: .container-build-common diff --git a/templates/java/gradle/gradle-build.gitlab-ci.yml b/templates/java/gradle/gradle-build.gitlab-ci.yml index f44eaca..2136fe2 100644 --- a/templates/java/gradle/gradle-build.gitlab-ci.yml +++ b/templates/java/gradle/gradle-build.gitlab-ci.yml @@ -13,7 +13,7 @@ $(sed -i /^version/s/$GRADLE_VERSION/\'$CI_COMMIT_TAG\'/ $PATH_TO_VERSION_FILE) fi script: - - "./gradlew --build-cache assemble $GRADLE_CLI_BUILD_OPTS $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS" + - ./gradlew --build-cache $GRADLE_OPTS assemble $GRADLE_CLI_BUILD_OPTS $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS artifacts: expire_in: 2 weeks when: on_success diff --git a/templates/java/gradle/gradle-database-diff.gitlab-ci.yml b/templates/java/gradle/gradle-database-diff.gitlab-ci.yml index 7ff8847..d355d85 100644 --- a/templates/java/gradle/gradle-database-diff.gitlab-ci.yml +++ b/templates/java/gradle/gradle-database-diff.gitlab-ci.yml @@ -13,7 +13,7 @@ include: if [ "$BACKEND_DIR" != "" ]; then cd $BACKEND_DIR fi - - ./gradlew liquibase:update liquibase:diff $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS + - ./gradlew --build-cache $GRADLE_OPTS liquibase:update liquibase:diff $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS artifacts: when: on_failure expire_in: 2 weeks diff --git a/templates/java/gradle/gradle-license.gitlab-ci.yml b/templates/java/gradle/gradle-license.gitlab-ci.yml index 2f324e9..df76522 100644 --- a/templates/java/gradle/gradle-license.gitlab-ci.yml +++ b/templates/java/gradle/gradle-license.gitlab-ci.yml @@ -6,7 +6,7 @@ if [ "$BACKEND_DIR" != "" ]; then cd $BACKEND_DIR fi - - "./gradlew --build-cache cyclonedxBom $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS" + - ./gradlew --build-cache $GRADLE_OPTS cyclonedxBom $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS needs: [] artifacts: expire_in: 2 weeks diff --git a/templates/java/gradle/gradle-verify.gitlab-ci.yml b/templates/java/gradle/gradle-verify.gitlab-ci.yml index 29abf58..bedfe43 100644 --- a/templates/java/gradle/gradle-verify.gitlab-ci.yml +++ b/templates/java/gradle/gradle-verify.gitlab-ci.yml @@ -6,7 +6,7 @@ if [ "$BACKEND_DIR" != "" ]; then cd $BACKEND_DIR fi - - "./gradlew --build-cache test $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS" + - ./gradlew --build-cache $GRADLE_OPTS test $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS artifacts: expire_in: 2 weeks reports: diff --git a/templates/static-analysis/sonar-7.gitlab-ci.yml b/templates/static-analysis/sonar-7.gitlab-ci.yml index a6e87da..dba3535 100644 --- a/templates/static-analysis/sonar-7.gitlab-ci.yml +++ b/templates/static-analysis/sonar-7.gitlab-ci.yml @@ -35,7 +35,7 @@ if [ "$BACKEND_DIR" != "" ]; then cd $BACKEND_DIR fi - - ./gradlew $GRADLE_OPTS sonarqube $GRADLE_CLI_OPTS + - ./gradlew --build-cache $GRADLE_OPTS sonarqube $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS "-Dsonar.host.url=$SONAR_HOST_URL" "-Dsonar.login=$SONAR_TOKEN" "-Dsonar.projectKey=$SONAR_PROJECT_KEY" diff --git a/templates/static-analysis/sonar-8.gitlab-ci.yml b/templates/static-analysis/sonar-8.gitlab-ci.yml index 790798b..5b5bcc8 100644 --- a/templates/static-analysis/sonar-8.gitlab-ci.yml +++ b/templates/static-analysis/sonar-8.gitlab-ci.yml @@ -36,7 +36,7 @@ if [ "$BACKEND_DIR" != "" ]; then cd $BACKEND_DIR fi - - ./gradlew $GRADLE_OPTS sonarqube $GRADLE_CLI_OPTS + - ./gradlew --build-cache $GRADLE_OPTS sonarqube $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS "-Dsonar.host.url=$SONAR_HOST_URL" "-Dsonar.login=$SONAR_TOKEN" "-Dsonar.projectKey=$SONAR_PROJECT_KEY"