ACS-457: Build linkage, tagging and release

- add validation on release jobs for the latest upstream tag
This commit is contained in:
Cezar.Leahu
2020-08-26 15:18:52 +03:00
parent 0ff416da28
commit 339a0f7b90

View File

@@ -111,3 +111,18 @@ function pullAndBuildSameBranchOnUpstream() {
popd
}
function retieveLatestTag() {
local REPO="${1}"
local BRANCH="${2}"
local LOCAL_PATH="/tmp/$(basename "${REPO%.git}")"
git clone -q -b "${BRANCH}" "https://${GIT_USERNAME}:${GIT_PASSWORD}@${REPO}" "${LOCAL_PATH}"
pushd "${LOCAL_PATH}" >/dev/null
git describe --abbrev=0 --tags
popd >/dev/null
rm -rf "${LOCAL_PATH}"
}