Merge pull request #4463 from travisn/version-suffix

Always use the version suffix from release build or tag pipeline
This commit is contained in:
Sébastien Han authored and GitHub committed 2019-12-10 15:29:10 +01:00
commit 592978b6b2
3 files changed
+6 -7

No files matched your search

Vendored
+2 -2
View File
@@ -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}'
}
}
}
+1 -1
View File
@@ -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"
}
}
}
+3 -4
View File
@@ -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