undercloud-upgrade: deploy n-1 first then upgrade

The current undercloud upgrade job deploys an undercloud from master so
upgrade was never actually tested. This patch finds out which release we
want to test and provide the right featureset file.

Co-authored-by: Jose Luis Franco <jfrancoa@redhat.com>
Change-Id: I3c9d2396988bd3125740f0054c66e8243e85f437
This commit is contained in:
Emilien Macchi 2018-04-27 20:49:21 -07:00 committed by Jose Luis Franco Arza
parent ccd6fe62a0
commit 7b843c32bb
2 changed files with 2 additions and 26 deletions

View File

@ -88,28 +88,3 @@ function run_with_timeout {
/usr/bin/timeout --preserve-status ${TIME_FOR_COMMAND}m ${COMMAND}
}
function next_release_from {
local release="${1:-master}"
case "${release}" in
# NOTE: we need to add a new release when we cut a stable branch
''|master)
echo "master"
;;
queens)
echo "master"
;;
pike)
echo "queens"
;;
ocata)
echo "pike"
;;
newton)
echo "ocata"
;;
*)
echo "UNKNOWN_RELEASE"
return 1
;;
esac
}

View File

@ -138,7 +138,8 @@ for JOB_TYPE_PART in $(sed 's/-/ /g' <<< "${TOCI_JOBTYPE:-}") ; do
TAGS="$TAGS,overcloud-update"
elif is_featureset undercloud_upgrade "$TRIPLEO_ROOT/tripleo-quickstart/config/general_config/$JOB_TYPE_PART.yml"; then
TAGS="$TAGS,undercloud-upgrade"
export UPGRADE_RELEASE=$(next_release_from "${QUICKSTART_RELEASE}")
export UPGRADE_RELEASE=$QUICKSTART_RELEASE
export QUICKSTART_RELEASE=$(previous_release_mixed_upgrade_case "${UPGRADE_RELEASE}")
fi
# Set UPGRADE_RELEASE if applicable
if [ -n "${MIXED_UPGRADE_TYPE}" ]; then