From d3250749d31f7d51d750f08258005cda6b668122 Mon Sep 17 00:00:00 2001 From: mfeix Date: Fri, 29 Oct 2021 09:56:33 +0200 Subject: [PATCH] docs(Container Publish): Add documentation for container-publish-snapshot and container-publish --- .../templates/container-publish-snapshot.adoc | 27 +++++++++++++++++++ .../chapters/templates/container-publish.adoc | 8 +++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 documentation/chapters/templates/container-publish-snapshot.adoc diff --git a/documentation/chapters/templates/container-publish-snapshot.adoc b/documentation/chapters/templates/container-publish-snapshot.adoc new file mode 100644 index 0000000..a3b8118 --- /dev/null +++ b/documentation/chapters/templates/container-publish-snapshot.adoc @@ -0,0 +1,27 @@ +:sourcedir: ../../../ + += Container-Publish-Snapshot + +Dieses Template funktioniert genauso wie das <<_container_publish, Container Publish>> Template. +Es wird jedoch in folgenden Branches ausgeführt. +Dabei sind die Imagenamen der Container abhängig von den Branchnamen. + +.Ausführung +|=== +|Branch |Container Image name +|DEFAULT BRANCH (master/main) |DOCKER_REGISTRY:latest +|feature/* |$DOCKER_REGISTRY:feature/(Branch-postfix) +|refactor/* |$DOCKER_REGISTRY:refactor/(Branch-postfix) +|=== + +.Variables +|=== +|Name |Description | Default Value +|| Siehe <<_container_publish, Container Publish>> | +|=== + +.sonar-template +[source,yaml] +---- +include::{sourcedir}/container-publish-snapshot.gitlab-ci.yml[] +---- \ No newline at end of file diff --git a/documentation/chapters/templates/container-publish.adoc b/documentation/chapters/templates/container-publish.adoc index 267d3f5..25e473e 100644 --- a/documentation/chapters/templates/container-publish.adoc +++ b/documentation/chapters/templates/container-publish.adoc @@ -4,16 +4,22 @@ Baut mithilfe von jib oder kaniko ein Docker Image und läd das Image in der Docker Registry des Projekts hoch. Dieser Schritt wird nur ausgeführt, wenn ein Tag gesetzt wird. +Wenn das Template ohne Tags benutzt werden soll, muss das Rules verärbt werden. + +Ein Snapshot Template bieten wir hier an: <<_container-publish-snapshot>> .Variables |=== |Name |Description | Default Value |MVN_VERSION | Bestimmt, ob die version von MAVEN gesetzt werden soll. Falls das Projekt aus mehreren Poms besteht, kann `before_script:` benutzt werden. | "true" +|DOCKER_REGISTRY | Definiert die Registry an zu dem das Image veröffentlicht werden soll | $CI_REGISTRY_IMAGE +|DOCKER_REGISTRY_USER | Definiert den User der benutzt werden soll | $CI_REGISTRY_USER +|DOCKER_REGISTRY_PASSWORD | Definiert das Passwort des Benutzers | $CI_REGISTRY_PASSWORD |=== .sonar-template -[source, yaml] +[source,yaml] ---- include::{sourcedir}/container-publish.gitlab-ci.yml[] ---- \ No newline at end of file