From 40f8ada250646cc647516ec2ff27f212bc417d4a Mon Sep 17 00:00:00 2001 From: Marcel Feix Date: Tue, 18 May 2021 14:52:31 +0200 Subject: [PATCH 1/9] feat(*): initial Commit --- .idea/.gitignore | 8 +++ .idea/gitlab-ci-templates.iml | 9 +++ .idea/misc.xml | 6 ++ .idea/modules.xml | 8 +++ .idea/sonarlint/issuestore/index.pb | 0 .idea/vcs.xml | 6 ++ README.adoc | 6 ++ README.md | 2 - STD-variablen-Template.yml | 33 +++++++++++ .../chapters/generalInformation.adoc | 59 +++++++++++++++++++ .../templates/maven-build-template.adoc | 15 +++++ .../maven-dependencies-template.adoc | 16 +++++ .../templates/maven-verify-template.adoc | 15 +++++ .../templates/npm-build-template.adoc | 15 +++++ .../templates/npm-dependencies-template.adoc | 16 +++++ .../chapters/templates/npm-lint-template.adoc | 15 +++++ .../chapters/templates/npm-test-template.adoc | 15 +++++ .../chapters/templates/publish-image.adoc | 18 ++++++ .../chapters/templates/sonar-template.adoc | 17 ++++++ documentation/document.adoc | 53 +++++++++++++++++ documentation/images/.gitkeep | 0 maven-build-template.yml | 10 ++++ maven-dependencies-template.yml | 5 ++ maven-verify-template.yml | 12 ++++ npm-build-template.yml | 11 ++++ npm-dependencies-template.yml | 5 ++ npm-lint-template.yml | 12 ++++ npm-test-template.yml | 8 +++ publish-image.yml | 39 ++++++++++++ 29 files changed, 432 insertions(+), 2 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/gitlab-ci-templates.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/sonarlint/issuestore/index.pb create mode 100644 .idea/vcs.xml create mode 100644 README.adoc delete mode 100644 README.md create mode 100644 STD-variablen-Template.yml create mode 100644 documentation/chapters/generalInformation.adoc create mode 100644 documentation/chapters/templates/maven-build-template.adoc create mode 100644 documentation/chapters/templates/maven-dependencies-template.adoc create mode 100644 documentation/chapters/templates/maven-verify-template.adoc create mode 100644 documentation/chapters/templates/npm-build-template.adoc create mode 100644 documentation/chapters/templates/npm-dependencies-template.adoc create mode 100644 documentation/chapters/templates/npm-lint-template.adoc create mode 100644 documentation/chapters/templates/npm-test-template.adoc create mode 100644 documentation/chapters/templates/publish-image.adoc create mode 100644 documentation/chapters/templates/sonar-template.adoc create mode 100644 documentation/document.adoc create mode 100644 documentation/images/.gitkeep create mode 100644 maven-build-template.yml create mode 100644 maven-dependencies-template.yml create mode 100644 maven-verify-template.yml create mode 100644 npm-build-template.yml create mode 100644 npm-dependencies-template.yml create mode 100644 npm-lint-template.yml create mode 100644 npm-test-template.yml create mode 100644 publish-image.yml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..73f69e0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/gitlab-ci-templates.iml b/.idea/gitlab-ci-templates.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/gitlab-ci-templates.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..639900d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b5124a3 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb new file mode 100644 index 0000000..e69de29 diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/README.adoc b/README.adoc new file mode 100644 index 0000000..3010fb4 --- /dev/null +++ b/README.adoc @@ -0,0 +1,6 @@ +ifndef::imagesdir[] +:imagesdir: documentation/images +endif::[] + +include::documentation/document.adoc[] + diff --git a/README.md b/README.md deleted file mode 100644 index d7b4e15..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Gitlab-CI-templates - diff --git a/STD-variablen-Template.yml b/STD-variablen-Template.yml new file mode 100644 index 0000000..8ad409a --- /dev/null +++ b/STD-variablen-Template.yml @@ -0,0 +1,33 @@ +stages: + - dependencies + - build + - test + - set-version + - publish + - post-process + - package + +cache: + key: "$CI_JOB_NAME" + paths: + - .m2/repository + - $FRONTEND_DIR/ + +variables: + CI_REGISTRY: gitlab.exxcellent.de:4567 + MAVEN_IMAGE: gitlab.exxcellent.de:4567/gilden/ci/exxcellent-java-maven-base-image:java11-maven3.8.1_latest + MAVEN_OPTS: > + -Dhttps.protocols=TLSv1.2 + -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN + -Dorg.slf4j.simpleLogger.showDateTime=true + -Djava.awt.headless=true + MAVEN_CLI_OPTS: > + --batch-mode + --errors + --fail-at-end + --show-version + -DinstallAtEnd=true + -DdeployAtEnd=true + SONAR_PROJECT_KEY: de.exxcellent.bwfps.csapp:csapp-middleware + FRONTEND_DIR: $CI_PROJECT_DIR \ No newline at end of file diff --git a/documentation/chapters/generalInformation.adoc b/documentation/chapters/generalInformation.adoc new file mode 100644 index 0000000..74216d0 --- /dev/null +++ b/documentation/chapters/generalInformation.adoc @@ -0,0 +1,59 @@ +:sourcedir: ../../ += General Information + +Um die Templates in deinem Projekt zu benutzten musst do folgendes machen: + +1. `Include` das Template file in deinem `.gitlab-ci.yaml` File. +2. Jetzt kannst du `extend` benutzen, um das Template zu integrieren. +Es ist möglich weitere veränderungen vorzunehmen. + +[source,yaml] +---- +stage: + - test-image + +include: + - project: 'gilden/ci/gitlab-ci-templates' + ref: 'master' + file: + - 'maven-build-template.yml' + - 'maven-dependencies-template.yml' + - 'maven-verify-template.yml' + - 'npm-build-template.yml' + - 'npm-dependencies-template.yml' + - 'npm-lint-template.yml' + - 'npm-test-template.yml' + - 'publish-image.yml' + - 'set-version-template.yml' + - 'sonar-template.yml' + + +test-image: + stage: test-image + extends: .build-image + when: manual + except: + - master + - tags + before_script: + - cd ImportantPath +---- + +[[Generel-Veriablen]] +== Generelle Variablen + +Bitte folgende Variablen in `.gitlab-ci.yaml` setzen + +|=== +|Name |Description +|CI_REGISTRY| Registry der CI +|MAVE_IMAGE| Das Image das benutzt werden soll für Jobs die Maven benötigen. +|NODE_IMAGE| Das Image das benutzt werden soll für Jobs die NPM benötigen +|MAVEN_OPTS| Generelle optionen um Maven zu verändern +|MAVEN_CLI_OPTS| Optionen um Maven beim Bauen zu verbessern. +|FRONTEND_DIR| Wenn das Projekt ein Frontend besitzt, muss der Pfad definiert werden, wo die note module gespeichert werden. +|=== + +---- +include::{sourcedir}/STD-variablen-Template.yml[] +---- \ No newline at end of file diff --git a/documentation/chapters/templates/maven-build-template.adoc b/documentation/chapters/templates/maven-build-template.adoc new file mode 100644 index 0000000..1db46ab --- /dev/null +++ b/documentation/chapters/templates/maven-build-template.adoc @@ -0,0 +1,15 @@ +:sourcedir: ../../../ + += maven-build-template + +Diese Template Baut die .jar Files und speichert die Ergebnisse als Artifact. + +.Variables +|=== +|Name |Description | Default Value +|=== + +.mvn-build-template +---- +include::{sourcedir}/maven-build-template.yml[] +---- \ No newline at end of file diff --git a/documentation/chapters/templates/maven-dependencies-template.adoc b/documentation/chapters/templates/maven-dependencies-template.adoc new file mode 100644 index 0000000..ab8a4a3 --- /dev/null +++ b/documentation/chapters/templates/maven-dependencies-template.adoc @@ -0,0 +1,16 @@ +:sourcedir: ../../../ + += maven-dependencies-template + +Dieses Template läd die Maven Abhängigkeiten des Projekts runter. +Bitte den Cache hinzufügen. Siehe xref:Generel-Veriablen[Generelle Veriablen] + +.Variables +|=== +|Name |Description | Default Value +|=== + +.mvn-dependencies-template +---- +include::{sourcedir}/maven-dependencies-template.yml[] +---- \ No newline at end of file diff --git a/documentation/chapters/templates/maven-verify-template.adoc b/documentation/chapters/templates/maven-verify-template.adoc new file mode 100644 index 0000000..4852abf --- /dev/null +++ b/documentation/chapters/templates/maven-verify-template.adoc @@ -0,0 +1,15 @@ +:sourcedir: ../../../ + += maven-verify-template + +Dieses Template startet `mvn verify` und speichert die Ergebnisse als Artifact. + +.Variables +|=== +|Name |Description | Default Value +|=== + +.mvn-verify-template +---- +include::{sourcedir}/maven-verify-template.yml[] +---- \ No newline at end of file diff --git a/documentation/chapters/templates/npm-build-template.adoc b/documentation/chapters/templates/npm-build-template.adoc new file mode 100644 index 0000000..836bd49 --- /dev/null +++ b/documentation/chapters/templates/npm-build-template.adoc @@ -0,0 +1,15 @@ +:sourcedir: ../../../ + += npm-build-template + +Dieses Template baut das NPM projekt und speichert die Ergebnisse als Artifact.. + +.Variables +|=== +|Name |Description | Default Value +|=== + +.npm-build-template +---- +include::{sourcedir}/npm-build-template.yml[] +---- \ No newline at end of file diff --git a/documentation/chapters/templates/npm-dependencies-template.adoc b/documentation/chapters/templates/npm-dependencies-template.adoc new file mode 100644 index 0000000..340006d --- /dev/null +++ b/documentation/chapters/templates/npm-dependencies-template.adoc @@ -0,0 +1,16 @@ +:sourcedir: ../../../ + += npm-dependencies-template + +Dieses Template läd die NPM Abhängigkeiten des Projekts runter. +Bitte den Cache hinzufügen. Siehe xref:Generel-Veriablen[Generelle Veriablen] + +.Variables +|=== +|Name |Description | Default Value +|=== + +.npm-dependencies-template +---- +include::{sourcedir}/npm-dependencies-template.yml[] +---- \ No newline at end of file diff --git a/documentation/chapters/templates/npm-lint-template.adoc b/documentation/chapters/templates/npm-lint-template.adoc new file mode 100644 index 0000000..8f89e87 --- /dev/null +++ b/documentation/chapters/templates/npm-lint-template.adoc @@ -0,0 +1,15 @@ +:sourcedir: ../../../ + += npm-lint-template + +Dieses Template durchläuft den Linter das NPM projekts. + +.Variables +|=== +|Name |Description | Default Value +|=== + +.npm-lint-template +---- +include::{sourcedir}/npm-lint-template.yml[] +---- \ No newline at end of file diff --git a/documentation/chapters/templates/npm-test-template.adoc b/documentation/chapters/templates/npm-test-template.adoc new file mode 100644 index 0000000..109a82b --- /dev/null +++ b/documentation/chapters/templates/npm-test-template.adoc @@ -0,0 +1,15 @@ +:sourcedir: ../../../ + += npm-test-template + +Dieses Template baut das NPM projekt. + +.Variables +|=== +|Name |Description | Default Value +|=== + +.npm-test-template +---- +include::{sourcedir}/npm-test-template.yml[] +---- \ No newline at end of file diff --git a/documentation/chapters/templates/publish-image.adoc b/documentation/chapters/templates/publish-image.adoc new file mode 100644 index 0000000..2c2fa41 --- /dev/null +++ b/documentation/chapters/templates/publish-image.adoc @@ -0,0 +1,18 @@ +:sourcedir: ../../../ + += Publish-Image-jib + +Baut mithilfe von jib ein Docker Image und läd es in der Docker Registry des Projekt hoch. +Dieser Schritt wird nur ausgeführt, wenn ein Tag gesetzt wird. + +.Variables +|=== +|Name |Description | Default Value +|MVN_VERSION | Bestimmt, ob die version von MAVEN gesetzt werden soll. +Falls das Projekt aus mehreren Poms besteht, kann `bevor_script:` benutzt werden. | "true" +|=== + +.sonar-template +---- +include::{sourcedir}/publish-image.yml[] +---- \ No newline at end of file diff --git a/documentation/chapters/templates/sonar-template.adoc b/documentation/chapters/templates/sonar-template.adoc new file mode 100644 index 0000000..dd5e6d7 --- /dev/null +++ b/documentation/chapters/templates/sonar-template.adoc @@ -0,0 +1,17 @@ +:sourcedir: ../../../ + += sonar-template + +Ruft den Sonar Job für das Projekt auf. +Mehr Details zu finden hier: https://gitlab.exxcellent.de/gilden/ci/exxcellent-sonar-tool[Gilde CI/CD: exxcellent-sonar-tool]. + +.Variables +|=== +|Name |Description | Default Value +|SONAR_PROJECT_KEY | Der Sonar-Projekt-Key. | "" +|=== + +.sonar-template +---- +include::{sourcedir}/sonar-template.yml[] +---- \ No newline at end of file diff --git a/documentation/document.adoc b/documentation/document.adoc new file mode 100644 index 0000000..65a24ae --- /dev/null +++ b/documentation/document.adoc @@ -0,0 +1,53 @@ += Gitlab - Ci - Templates +// ######################################################################### +// Die folgende Zeile NICHT ändern. Keine Leerzeilen einfügen! +// Hier fügt das eXXcellent-documentation-tool Metadaten zur Build-Zeit ein +// ######################################################################### +###exxcellent_base_template_placeholder### +// ########################################################################## +// Hinter :imagesdir: den relavtiven Pfad zu dem Ordner angeben, an dem alle Images der *.adoc files liegen. +// Am besten den vorgegebenen Ordner 'images' einfach so lassen und verwenden. +// ########################################################################## +ifndef::imagesdir[] +:imagesdir: images +endif::[] +// ########################################################################## +// Bei Bedarf anpassen +// Dokumentenklassifizierung = Öffentlich, Intern, Vertraulich, Streng vertraulich +// ########################################################################## +:revnumber: 1.0 +:classification: Intern +:author: Marcel Feix + +Diese Repository enthält alle generellen CI Templates der CI Gilde. +Templates für Tools werden in den Repositorys der Tools gepflegt. + + +// ########################################################################### +// Das Inhaltsverzeichnis ist nur im generierten HTML/PDF sichtbar (immer an erster Stelle, technisch bedingt) +// ########################################################################### +toc::[] + +// ########################################################################### +// Attribut leveloffset addiert die gegebene Zahl zu den Überschriften im Dokument +// Alle Überschriften erscheinen also eine Ebene tiefer +// ########################################################################### +include::chapters/generalInformation.adoc[leveloffset=1] + +== Misc Templates + +include::chapters/templates/sonar-template.adoc[leveloffset=1] +include::chapters/templates/publish-image.adoc[leveloffset=1] + +== NPM Templates + +include::chapters/templates/npm-dependencies-template.adoc[leveloffset=1] +include::chapters/templates/npm-build-template.adoc[leveloffset=1] +include::chapters/templates/npm-lint-template.adoc[leveloffset=1] +include::chapters/templates/npm-test-template.adoc[leveloffset=1] + +== Maven Templates + +include::chapters/templates/maven-dependencies-template.adoc[leveloffset=1] +include::chapters/templates/maven-build-template.adoc[leveloffset=1] +include::chapters/templates/maven-verify-template.adoc[leveloffset=1] \ No newline at end of file diff --git a/documentation/images/.gitkeep b/documentation/images/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/maven-build-template.yml b/maven-build-template.yml new file mode 100644 index 0000000..bdccbe2 --- /dev/null +++ b/maven-build-template.yml @@ -0,0 +1,10 @@ +.maven-build: + stage: build + image: $MAVEN_IMAGE + script: + - mvn $MAVEN_CLI_OPTS clean package -DskipTests + artifacts: + expire_in: 2 weeks + when: always + paths: + - $BACKEND_DIR/target/*.jar \ No newline at end of file diff --git a/maven-dependencies-template.yml b/maven-dependencies-template.yml new file mode 100644 index 0000000..3f938a4 --- /dev/null +++ b/maven-dependencies-template.yml @@ -0,0 +1,5 @@ +.maven-dependencies: + stage: dependencies + image: $MAVEN_IMAGE + script: + - "mvn $MAVEN_CLI_OPTS dependency:resolve" \ No newline at end of file diff --git a/maven-verify-template.yml b/maven-verify-template.yml new file mode 100644 index 0000000..8104905 --- /dev/null +++ b/maven-verify-template.yml @@ -0,0 +1,12 @@ +.maven-test: + image: $MAVEN_IMAGE + stage: test + allow_failure: true + script: + - mvn $MAVEN_CLI_OPTS verify + artifacts: + expire_in: 2 weeks + reports: + junit: + - $BACKEND_DIR/target/surefire-reports/TEST-*.xml + - $BACKEND_DIR/target/failsafe-reports/TEST-*.xml \ No newline at end of file diff --git a/npm-build-template.yml b/npm-build-template.yml new file mode 100644 index 0000000..86e939c --- /dev/null +++ b/npm-build-template.yml @@ -0,0 +1,11 @@ +.npm-build: + image: $NODE_IMAGE + stage: build + script: + - npm install + - npm run build + artifacts: + expire_in: 2 weeks + when: always + paths: + - dist/* \ No newline at end of file diff --git a/npm-dependencies-template.yml b/npm-dependencies-template.yml new file mode 100644 index 0000000..0980d89 --- /dev/null +++ b/npm-dependencies-template.yml @@ -0,0 +1,5 @@ +.npm-dependencies: + image: $NODE_IMAGE + stage: dependencies + script: + - npm install diff --git a/npm-lint-template.yml b/npm-lint-template.yml new file mode 100644 index 0000000..f9562b2 --- /dev/null +++ b/npm-lint-template.yml @@ -0,0 +1,12 @@ +.npm-lint: + image: $NODE_IMAGE + stage: test + before_script: + script: + - npm install -g eslint + - npm run lint +# artifacts: todo add lint results in artifact if posible +# expire_in: 2 weeks +# when: always +# paths: +# - dist/* \ No newline at end of file diff --git a/npm-test-template.yml b/npm-test-template.yml new file mode 100644 index 0000000..34d4948 --- /dev/null +++ b/npm-test-template.yml @@ -0,0 +1,8 @@ +.npm-test: + image: $NODE_IMAGE + stage: test + before_script: + - npm install -g rimraf karma + script: + - cd $FRONTEND_DIR + - npm run test-ci \ No newline at end of file diff --git a/publish-image.yml b/publish-image.yml new file mode 100644 index 0000000..44ff53c --- /dev/null +++ b/publish-image.yml @@ -0,0 +1,39 @@ +.publish-image-jib: + image: $MAVEN_IMAGE + stage: package + only: + - tags + variables: + MVN_VERSION: "true" + script: + - export PARSED_VERSION=$(echo $CI_COMMIT_TAG | sed -r 's/\+/_/g') # Replace + sign since this is not valid in a docker tag + - echo $PARSED_VERSION + - > + if [ "${MVN_VERSION}" == "true" ]; then + mvn versions:set -DnewVersion=$PARSED_VERSION -DgenerateBackupPoms=false + fi + - mvn $MAVEN_CLI_OPTS compile jib:build + "-DskipTests" + "-Djib.to.auth.username=$CI_REGISTRY_USER" + "-Djib.to.auth.password=$CI_REGISTRY_PASSWORD" + +.publish-image-kaniko: + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [ "" ] + stage: package + only: + - tags + variables: + DOCKER_REGISTRY: $CI_REGISTRY + DOCKER_REGISTRY_USER: $CI_REGISTRY_USER + DOCKER_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD + PROJECT_DIR: $CI_PROJECT_DIR + DOCKERFILE_LOCATION: $CI_PROJECT_DIR/Dockerfile + bevor_script: + - export PARSED_VERSION=$(echo $CI_COMMIT_TAG | sed -r 's/\+/_/g') # Replace + sign since this is not valid in a docker tag + - export IMAGE_NAME=$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG + script: + - mkdir -p /kaniko/.docker + - echo "{\"auths\":{\"DOCKER_REGISTRY\":{\"username\":\"$DOCKER_REGISTRY_USER\",\"password\":\"$DOCKER_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json + - /kaniko/executor --context $PROJECT_DIR --dockerfile $DOCKERFILE_LOCATION --destination $IMAGE_NAME --skip-tls-verify From 4881407dd3f146ef051516156091e27c0cf7fb99 Mon Sep 17 00:00:00 2001 From: Marcel Feix Date: Fri, 21 May 2021 09:58:44 +0200 Subject: [PATCH 2/9] chore(Git Ignore): Add .gitIgnore file --- .gitignore | 74 +++++++++++++++++++++++++++++ .idea/sonarlint/issuestore/index.pb | 0 2 files changed, 74 insertions(+) create mode 100644 .gitignore delete mode 100644 .idea/sonarlint/issuestore/index.pb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a16fa7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,74 @@ +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb deleted file mode 100644 index e69de29..0000000 From c3da44b807458a4b25f7d56efe3deec9b6780e44 Mon Sep 17 00:00:00 2001 From: Marcel Feix Date: Fri, 21 May 2021 10:03:44 +0200 Subject: [PATCH 3/9] chore(Git Ignore): Removed not needed idea files. --- .../issuestore/2/e/2eef21b10116aab77b6b014cb5adf007d2d2e128 | 0 .idea/sonarlint/issuestore/index.pb | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 .idea/sonarlint/issuestore/2/e/2eef21b10116aab77b6b014cb5adf007d2d2e128 create mode 100644 .idea/sonarlint/issuestore/index.pb diff --git a/.idea/sonarlint/issuestore/2/e/2eef21b10116aab77b6b014cb5adf007d2d2e128 b/.idea/sonarlint/issuestore/2/e/2eef21b10116aab77b6b014cb5adf007d2d2e128 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb new file mode 100644 index 0000000..201e7fb --- /dev/null +++ b/.idea/sonarlint/issuestore/index.pb @@ -0,0 +1,3 @@ + +A +publish-image.yml,2/e/2eef21b10116aab77b6b014cb5adf007d2d2e128 \ No newline at end of file From bd1cb0fb5479d8766383233bcc4a6a0b39243795 Mon Sep 17 00:00:00 2001 From: Marcel Feix Date: Fri, 21 May 2021 10:07:11 +0200 Subject: [PATCH 4/9] docs(generalIformation): corrected Typos --- documentation/chapters/generalInformation.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/chapters/generalInformation.adoc b/documentation/chapters/generalInformation.adoc index 74216d0..df715b0 100644 --- a/documentation/chapters/generalInformation.adoc +++ b/documentation/chapters/generalInformation.adoc @@ -1,11 +1,11 @@ :sourcedir: ../../ = General Information -Um die Templates in deinem Projekt zu benutzten musst do folgendes machen: +Um die Templates in deinem Projekt zu benutzten musst du folgendes machen: 1. `Include` das Template file in deinem `.gitlab-ci.yaml` File. 2. Jetzt kannst du `extend` benutzen, um das Template zu integrieren. -Es ist möglich weitere veränderungen vorzunehmen. +Es ist möglich weitere Veränderungen vorzunehmen. [source,yaml] ---- @@ -39,7 +39,7 @@ test-image: - cd ImportantPath ---- -[[Generel-Veriablen]] +[[Generel-Variablen]] == Generelle Variablen Bitte folgende Variablen in `.gitlab-ci.yaml` setzen From 9b991c18f5efea19e1ff62d22e575aaf5fa5e85d Mon Sep 17 00:00:00 2001 From: Marcel Feix Date: Tue, 8 Jun 2021 10:59:58 +0200 Subject: [PATCH 5/9] fix(publish image): correct before_script --- publish-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish-image.yml b/publish-image.yml index 44ff53c..4966c3a 100644 --- a/publish-image.yml +++ b/publish-image.yml @@ -30,7 +30,7 @@ DOCKER_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD PROJECT_DIR: $CI_PROJECT_DIR DOCKERFILE_LOCATION: $CI_PROJECT_DIR/Dockerfile - bevor_script: + before_script: - export PARSED_VERSION=$(echo $CI_COMMIT_TAG | sed -r 's/\+/_/g') # Replace + sign since this is not valid in a docker tag - export IMAGE_NAME=$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG script: From 6e02d7261895516335bd61d9d98ca77323bba6df Mon Sep 17 00:00:00 2001 From: Marcel Feix Date: Tue, 8 Jun 2021 11:01:30 +0200 Subject: [PATCH 6/9] docs(General Info): correct typo to stages --- documentation/chapters/generalInformation.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/chapters/generalInformation.adoc b/documentation/chapters/generalInformation.adoc index df715b0..2b47efc 100644 --- a/documentation/chapters/generalInformation.adoc +++ b/documentation/chapters/generalInformation.adoc @@ -9,7 +9,7 @@ Es ist möglich weitere Veränderungen vorzunehmen. [source,yaml] ---- -stage: +stages: - test-image include: From 9e8fe7c6c24a96f252098f8b8d47ac0f5e5bff34 Mon Sep 17 00:00:00 2001 From: Marcel Feix Date: Tue, 8 Jun 2021 11:06:05 +0200 Subject: [PATCH 7/9] feat(Publish-image): Make context variable --- publish-image.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/publish-image.yml b/publish-image.yml index 4966c3a..121b81c 100644 --- a/publish-image.yml +++ b/publish-image.yml @@ -30,10 +30,11 @@ DOCKER_REGISTRY_PASSWORD: $CI_REGISTRY_PASSWORD PROJECT_DIR: $CI_PROJECT_DIR DOCKERFILE_LOCATION: $CI_PROJECT_DIR/Dockerfile + CONTEXT_LOCATION: $CI_PROJECT_DIR before_script: - export PARSED_VERSION=$(echo $CI_COMMIT_TAG | sed -r 's/\+/_/g') # Replace + sign since this is not valid in a docker tag - export IMAGE_NAME=$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG script: - mkdir -p /kaniko/.docker - echo "{\"auths\":{\"DOCKER_REGISTRY\":{\"username\":\"$DOCKER_REGISTRY_USER\",\"password\":\"$DOCKER_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - - /kaniko/executor --context $PROJECT_DIR --dockerfile $DOCKERFILE_LOCATION --destination $IMAGE_NAME --skip-tls-verify + - /kaniko/executor --context $CONTEXT_LOCATION --dockerfile $DOCKERFILE_LOCATION --destination $IMAGE_NAME --skip-tls-verify From ec0007aa1c803bc1f0d18bad59e8d11aaa0ae7dc Mon Sep 17 00:00:00 2001 From: Marcel Feix Date: Tue, 8 Jun 2021 11:17:04 +0200 Subject: [PATCH 8/9] feat(Publish-image): make use of rules instead of only --- publish-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/publish-image.yml b/publish-image.yml index 121b81c..2e092e7 100644 --- a/publish-image.yml +++ b/publish-image.yml @@ -22,8 +22,8 @@ name: gcr.io/kaniko-project/executor:debug entrypoint: [ "" ] stage: package - only: - - tags + rules: + - if: $CI_COMMIT_TAG variables: DOCKER_REGISTRY: $CI_REGISTRY DOCKER_REGISTRY_USER: $CI_REGISTRY_USER From 88d9abba54b3cee62af35ea3249331af95485312 Mon Sep 17 00:00:00 2001 From: Marcel Feix Date: Tue, 8 Jun 2021 12:45:47 +0200 Subject: [PATCH 9/9] fix(Publish-image): correct variable of Docker Registry --- publish-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish-image.yml b/publish-image.yml index 2e092e7..5abb8a8 100644 --- a/publish-image.yml +++ b/publish-image.yml @@ -36,5 +36,5 @@ - export IMAGE_NAME=$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG script: - mkdir -p /kaniko/.docker - - echo "{\"auths\":{\"DOCKER_REGISTRY\":{\"username\":\"$DOCKER_REGISTRY_USER\",\"password\":\"$DOCKER_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json + - echo "{\"auths\":{\"$DOCKER_REGISTRY\":{\"username\":\"$DOCKER_REGISTRY_USER\",\"password\":\"$DOCKER_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - /kaniko/executor --context $CONTEXT_LOCATION --dockerfile $DOCKERFILE_LOCATION --destination $IMAGE_NAME --skip-tls-verify