diff --git a/Jenkinsfile b/Jenkinsfile index 76bcd965c..a7c9f56c1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -146,8 +146,8 @@ pipeline { } steps { sh 'docker login -u="${DOCKER_USR}" -p="${DOCKER_PSW}"' - sh 'build/run make -j\$(nproc) -C build/release build BRANCH_NAME=${BRANCH_NAME} GIT_API_TOKEN=${GIT_PSW}' - sh 'build/run make -j\$(nproc) -C build/release publish BRANCH_NAME=${BRANCH_NAME} AWS_ACCESS_KEY_ID=${AWS_USR} AWS_SECRET_ACCESS_KEY=${AWS_PSW} GIT_API_TOKEN=${GIT_PSW}' + sh 'build/run make -j\$(nproc) -C build/release build BRANCH_NAME=${BRANCH_NAME} TAG_WITH_SUFFIX=true GIT_API_TOKEN=${GIT_PSW}' + sh 'build/run make -j\$(nproc) -C build/release publish BRANCH_NAME=${BRANCH_NAME} TAG_WITH_SUFFIX=true AWS_ACCESS_KEY_ID=${AWS_USR} AWS_SECRET_ACCESS_KEY=${AWS_PSW} GIT_API_TOKEN=${GIT_PSW}' } } } diff --git a/build/release/Jenkinsfile.tag b/build/release/Jenkinsfile.tag index 5ce5c5f34..09b28cfdd 100644 --- a/build/release/Jenkinsfile.tag +++ b/build/release/Jenkinsfile.tag @@ -21,7 +21,7 @@ pipeline { steps { // github credentials are not setup to push over https in jenkins. add the github token to the url sh "git config remote.origin.url https://${GITHUB_USR}:${GITHUB_PSW}@\$(git config --get remote.origin.url | sed -e 's/https:\\/\\///')" - sh "make -j\$(nproc) -C build/release tag VERSION=${params.version} COMMIT_HASH=${params.commit}" + sh "make -j\$(nproc) -C build/release tag VERSION=${params.version} COMMIT_HASH=${params.commit} TAG_WITH_SUFFIX=true" } } } diff --git a/build/release/Makefile b/build/release/Makefile index 0b2f321fc..309d7d51f 100644 --- a/build/release/Makefile +++ b/build/release/Makefile @@ -25,10 +25,9 @@ ifeq ($(filter master release,$(CHANNEL)),) $(error invalid channel $(CHANNEL)) endif -# When a release branch is first created, the tag shows up in the master branch build tags. -# When that tag has the alpha, beta, or rc suffixes, we want to remove it since it is only -# relevant to the release tags. -ifeq ($(CHANNEL),master) +# When running the tag pipeline or release build we always want to add the alpha, beta, or rc suffix +# if provided. Otherwise, it's a master build where we don't want to apply the suffix. +ifneq ($(TAG_WITH_SUFFIX),true) override VERSION := $(shell echo "$(VERSION)" | sed -e 's/-alpha.0//' -e 's/-beta.0//' -e 's/-rc.0//') endif