From 7f3b5786321d0920558f47876ea0218134beeb3c Mon Sep 17 00:00:00 2001 From: Karina Schulz Date: Thu, 8 Jul 2021 16:12:27 +0200 Subject: [PATCH] doc(update-version-pipeline): fix documentation --- .../pipelines/update-version-pipeline.adoc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/documentation/chapters/pipelines/update-version-pipeline.adoc b/documentation/chapters/pipelines/update-version-pipeline.adoc index 101ef85..1947016 100644 --- a/documentation/chapters/pipelines/update-version-pipeline.adoc +++ b/documentation/chapters/pipelines/update-version-pipeline.adoc @@ -77,15 +77,20 @@ include: # This is optional push-docker-image: + extends: .publish-image-kaniko stage: release - extends: .push-image-kaniko -# You only need NEED if you use a artifact from your parent pipeline to build the image + # You only need NEED if you use a artifact from your parent pipeline to build the image needs: - pipeline: $PARENT_PIPELINE_ID - #Get artifacts from parent pipeline #https://docs.gitlab.com/ee/ci/yaml/README.html#artifact-downloads-to-child-pipelines - job: mvn-build + job: Build - job: increase-version - - job: push-tag-version + - job: push-tag-and-version + rules: + - when: always + before_script: + - "[ -f ./version ] && export LATEST_VERSION=$(cat ./version)" + - export PARSED_VERSION=$(echo $LATEST_VERSION | sed -r 's/\+/_/g') # Replace + sign since this is not valid in a docker tag + - export IMAGE_NAME=$CI_REGISTRY_IMAGE:$PARSED_VERSION ---- You pipeline then looks like the following: