Commit f5a1c07f authored by intrigeri's avatar intrigeri
Browse files

Embed the base branch name and its top commit into the generated filename,...

Embed the base branch name and its top commit into the generated filename, when building from a topic branch in Jenkins.
parent bbbbf2b4
......@@ -121,6 +121,13 @@ if [ -n "$JENKINS_URL" ] && [ -z "$GIT_TAG" ] \
echo "(at commit ${GIT_BASE_BRANCH_COMMIT})..."
git merge --no-edit "origin/${GIT_BASE_BRANCH}" \
|| fatal "Failed to merge base branch."
# Adjust BUILD_BASENAME to embed the base branch name and its top commit
CLEAN_GIT_BASE_BRANCH=$(echo "$GIT_BASE_BRANCH" | sed 's,/,_,g')
GIT_BASE_BRANCH_SHORT_ID=$(git rev-parse --short "origin/${GIT_BASE_BRANCH}") \
|| fatal "Base branch's top commit short ID could not be guessed."
BUILD_BASENAME="${BUILD_BASENAME}+${CLEAN_GIT_BASE_BRANCH}"
BUILD_BASENAME="${BUILD_BASENAME}@${GIT_BASE_BRANCH_SHORT_ID}"
fi
case "$LB_BINARY_IMAGES" in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment