From b5aca74bd284b95eb0c30f296032029bacc4e730 Mon Sep 17 00:00:00 2001 From: Sam Betts Date: Wed, 29 Nov 2017 16:28:02 +0000 Subject: [PATCH] Fix setup_project checking out eol with branch name A recent change to devstack-gate to enable falling back to EOL tags for zuulv2 has a bug in it where it will try to checkout the stable/branch instead of the converted eol tag. This patch addresses that issue. Change-Id: I23330884da09befc3bca10973cbfd2ea9b666430 --- functions.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions.sh b/functions.sh index 4509e12d..692a26a8 100644 --- a/functions.sh +++ b/functions.sh @@ -404,12 +404,13 @@ function setup_project { # It's there, so check it out. git_checkout_branch $project FETCH_HEAD else + eol_tag=${base_branch#stable/}-eol if git_has_branch $project $branch; then git_checkout_branch $project $branch # NOTE(sambetts) If there is no stable/* branch try to checkout the # *-eol tag for that version - elif [[ "$branch" == stable/* ]] && git_has_tag $project "${branch#stable/}-eol"; then - git_checkout_tag $project $branch + elif [[ "$branch" == stable/* ]] && git_has_tag $project $eol_tag; then + git_checkout_tag $project $eol_tag else git_checkout_branch $project master fi