build: always use the version suffix from tag pipeline
The version suffix such as alpha.0, beta.0, or rc.0 only apply when running the tag pipeline or the release build. Otherwise, we don't want to use the suffix from the master build. Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
This commit is contained in:
3 files changed
+6
-7
No files matched your search
Vendored
+2
-2
@@ -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}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user