From 284cd1cfc03025ae599dfc73e13e5ecec65c7290 Mon Sep 17 00:00:00 2001 From: Timo Beller Date: Wed, 13 Jul 2022 16:44:20 +0200 Subject: [PATCH 1/6] feat(sonar): Setze Projekt-Beschreibung, Versionsnummer und Link zu Gitlab --- templates/static-analysis/sonar-8.gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/static-analysis/sonar-8.gitlab-ci.yml b/templates/static-analysis/sonar-8.gitlab-ci.yml index 6758942..2de11fc 100644 --- a/templates/static-analysis/sonar-8.gitlab-ci.yml +++ b/templates/static-analysis/sonar-8.gitlab-ci.yml @@ -21,9 +21,12 @@ "-Dsonar.login=$SONAR_TOKEN" "-Dsonar.projectKey=$SONAR_PROJECT_KEY" "-Dsonar.projectName=$SONAR_PROJECT_NAME" + "-Dsonar.projectDescription=$CI_PROJECT_DESCRIPTION" + "-Dsonar.projectVersion=$CI_COMMIT_SHORT_SHA" "-Dsonar.exclusions=$SONAR_EXCLUSIONS" "-Dsonar.qualitygate.wait=$SONAR_QUALITYGATE_WAIT" "-Dsonar.qualitygate.timeout=$SONAR_QUALITYGATE_TIMEOUT" + "-Dsonar.links.scm=$CI_PROJECT_URL" .sonar-gradle: extends: .sonar-template-common @@ -38,6 +41,9 @@ "-Dsonar.login=$SONAR_TOKEN" "-Dsonar.projectKey=$SONAR_PROJECT_KEY" "-Dsonar.projectName=$SONAR_PROJECT_NAME" + "-Dsonar.projectDescription=$CI_PROJECT_DESCRIPTION" + "-Dsonar.projectVersion=$CI_COMMIT_SHORT_SHA" "-Dsonar.exclusions=$SONAR_EXCLUSIONS" "-Dsonar.qualitygate.wait=$SONAR_QUALITYGATE_WAIT" "-Dsonar.qualitygate.timeout=$SONAR_QUALITYGATE_TIMEOUT" + "-Dsonar.links.scm=$CI_PROJECT_URL" From b51d9fa611155a100b025c29bdf207876b65d310 Mon Sep 17 00:00:00 2001 From: Timo Beller Date: Wed, 13 Jul 2022 16:45:24 +0200 Subject: [PATCH 2/6] fix(gradle): Nutze aktuelleres Gradle_Image --- templates/common/common-ci-variablen.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/common/common-ci-variablen.gitlab-ci.yml b/templates/common/common-ci-variablen.gitlab-ci.yml index aa5eb0c..5aa84d3 100644 --- a/templates/common/common-ci-variablen.gitlab-ci.yml +++ b/templates/common/common-ci-variablen.gitlab-ci.yml @@ -54,7 +54,7 @@ variables: description: "Additional options that are passed to gradle for faster/stable execution" GRADLE_IMAGE: - value: gitlab.exxcellent.de:4567/gilden/ci/exxcellent-java-maven-base-image:java11-maven3.8.3_latest + value: gitlab.exxcellent.de:4567/gilden/ci/exxcellent-java-maven-base-image:java11-maven3.8.5 description: "Default Image to use in Gradle Jobs" # Currently, we use the Maven image and use the Gradle Wrapper. This is slower but more compatible to your gradle scripts. # Please Update your Gradle Wrapper from time to time. Use Renovate to automat that task. From f49484d11d9f4bcee7e317fd4986f9684e285213 Mon Sep 17 00:00:00 2001 From: Timo Beller Date: Wed, 13 Jul 2022 16:47:14 +0200 Subject: [PATCH 3/6] =?UTF-8?q?fix(npm-build):=20Code=20f=C3=BChrt=20zu=20?= =?UTF-8?q?Fehler=20(s.u.),=20daher=20erstmal=20entfernt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit npm ERR! code ENOGIT npm ERR! No git binary found in $PATH npm ERR! npm ERR! Failed using git. npm ERR! Please check if you have git installed and in your PATH. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-07-13T13_58_45_828Z-debug-0.log --- templates/npm/npm-build.gitlab-ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/templates/npm/npm-build.gitlab-ci.yml b/templates/npm/npm-build.gitlab-ci.yml index 7fe3d4e..8cad713 100644 --- a/templates/npm/npm-build.gitlab-ci.yml +++ b/templates/npm/npm-build.gitlab-ci.yml @@ -8,11 +8,6 @@ if [ "$FRONTEND_DIR" != "" ]; then cd $FRONTEND_DIR fi - # Requires npm > 8.X - - > - if [ "$CI_COMMIT_TAG" != "" ]; then - npm --no-git-tag-version version from-git - fi script: - npm run ci:build artifacts: From a214cccafd6debfa37613c357571aa7a7092e210 Mon Sep 17 00:00:00 2001 From: Timo Beller Date: Wed, 13 Jul 2022 17:06:18 +0200 Subject: [PATCH 4/6] =?UTF-8?q?feat(db-diff):=20Artifact-Code=20robuster?= =?UTF-8?q?=20gemacht=20bzw.=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Achtung: Ungetestet --- templates/java/gradle/gradle-database-diff.gitlab-ci.yml | 6 +++++- templates/java/maven/maven-database-diff.gitlab-ci.yml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/java/gradle/gradle-database-diff.gitlab-ci.yml b/templates/java/gradle/gradle-database-diff.gitlab-ci.yml index ba578f9..7ff8847 100644 --- a/templates/java/gradle/gradle-database-diff.gitlab-ci.yml +++ b/templates/java/gradle/gradle-database-diff.gitlab-ci.yml @@ -14,4 +14,8 @@ include: cd $BACKEND_DIR fi - ./gradlew liquibase:update liquibase:diff $GRADLE_CLI_OPTS $GRADLE_EXTRA_OPTS - + artifacts: + when: on_failure + expire_in: 2 weeks + paths: + - '**/build/db-diff.xml' diff --git a/templates/java/maven/maven-database-diff.gitlab-ci.yml b/templates/java/maven/maven-database-diff.gitlab-ci.yml index 683e3d5..f87ae36 100644 --- a/templates/java/maven/maven-database-diff.gitlab-ci.yml +++ b/templates/java/maven/maven-database-diff.gitlab-ci.yml @@ -18,4 +18,4 @@ include: when: on_failure expire_in: 2 weeks paths: - - $BACKEND_DIR/target/db-diff.xml \ No newline at end of file + - '**/target/db-diff.xml' \ No newline at end of file From 943537f0199c2d6ff98ef6b6ed86a77b64eaa6d8 Mon Sep 17 00:00:00 2001 From: Timo Beller Date: Wed, 13 Jul 2022 17:25:04 +0200 Subject: [PATCH 5/6] feat(license): Kein Verzeichniswechsel, suche BOM-File in Standardpfaden MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bei (bedingtem) Verzeichnis wären absolute Dateipfade sinnvoll, damit der Artefact-Export funktioniert. Ein Verzeichniswechsel scheint aber garnicht notwendig zu sein, wenn die BOM-Datei korrekt/absolut angegeben ist. --- templates/license/license.gitlab-ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/templates/license/license.gitlab-ci.yml b/templates/license/license.gitlab-ci.yml index 7ce5190..7ef0aa5 100644 --- a/templates/license/license.gitlab-ci.yml +++ b/templates/license/license.gitlab-ci.yml @@ -8,9 +8,15 @@ INVALID_LICENSE_ADOC_FILE: invalid-licenses.adoc NUMBER_OF_ALLOWED_FAILURES: 0 script: + # If bom-file does not exist, search for it in default-maven directory - > - if [ "$BACKEND_DIR" != "" ]; then - cd $BACKEND_DIR + if [[ ! -f "$BOM_FILE" && -f "$BACKEND_DIR/target/bom.json" ]]; then + export BOM_FILE=$BACKEND_DIR/target/bom.json + fi + # If bom-file does not exist, search for it in default-gradle directory + - > + if [[ ! -f "$BOM_FILE" && -f "$BACKEND_DIR/build/reports/bom.json" ]]; then + export BOM_FILE=$BACKEND_DIR/build/reports/bom.json fi - export NUMBER_OF_INVALID_LICENSES=0 - export INVALID_BOM_FILE=invalid-bom.json From efc38729143afbc841b4d60de6068c6385357311 Mon Sep 17 00:00:00 2001 From: Timo Beller Date: Wed, 13 Jul 2022 21:37:31 +0200 Subject: [PATCH 6/6] =?UTF-8?q?feat(documentation):=20Entferne=20potentiel?= =?UTF-8?q?le=20Variable=20welche=20das=20Skript=20st=C3=B6rt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Bessere) Alternative wäre, dass die gesetzte Variable das Skript nicht stört. Mich hat es allerdings etwas Zeit gekostet, bis ich diese Ursache gefunde hatte ... --- templates/documentations/documentation.gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/documentations/documentation.gitlab-ci.yml b/templates/documentations/documentation.gitlab-ci.yml index 49f1749..e9b6c75 100644 --- a/templates/documentations/documentation.gitlab-ci.yml +++ b/templates/documentations/documentation.gitlab-ci.yml @@ -31,6 +31,7 @@ variables: OUTPUT_DIR: public script: + - unset GRADLE_USER_HOME - publish artifacts: paths: [ public/ ]