Prepare TripleO CI for stable/ocata

* Prepare undercloud upgrade job to support stable/ocata, though don't
  switch yet since it's not released.
* Put some comments in upgrade blocks to mention Newton is hardcoded and
  some work needs to be done to be release agnostic.
* Update the distgit branch logic for Mitaka, Newton and Ocata.

Change-Id: Ia2fa8e251439634d162512ccdad6c68529fda03e
This commit is contained in:
Emilien Macchi 2017-01-24 07:34:43 -05:00
parent c65e714c6f
commit 64ad4bed4b
3 changed files with 20 additions and 6 deletions

View File

@ -237,6 +237,7 @@ if [ "$MULTINODE" = "1" ]; then
# Start the script that will configure os-collect-config on the subnodes
source ~/stackrc
# TODO: This whole block is not release agnostic and Newton is hardcoded. We'll need to detect which release we want to test.
if [ "$OVERCLOUD_MAJOR_UPGRADE" == 1 ] ; then
# Download the previous release openstack-tripleo-heat-templates to a directory
# we then deploy this and later upgrade to the default --templates location
@ -350,9 +351,12 @@ fi
if [ "$UNDERCLOUD_MAJOR_UPGRADE" == 1 ] ; then
# Reset or unset STABLE_RELEASE so that we upgrade to the next major
# version
if [ "$STABLE_RELEASE" = "mitaka" ]; then
if [ "$STABLE_RELEASE" = "ocata" ]; then
export STABLE_RELEASE=""
elif [ "$STABLE_RELEASE" = "mitaka" ]; then
export STABLE_RELEASE="newton"
elif [ "$STABLE_RELEASE" = "newton" ]; then
# TODO: switch STABLE_RELEASE to ocata when released
export STABLE_RELEASE=""
fi
echo_vars_to_deploy_env
@ -361,6 +365,7 @@ if [ "$UNDERCLOUD_MAJOR_UPGRADE" == 1 ] ; then
$TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh --undercloud-upgrade 2>&1 | ts '%Y-%m-%d %H:%M:%S.000 |' | sudo dd of=/var/log/undercloud_upgrade.txt || (tail -n 50 /var/log/undercloud_upgrade.txt && false)
fi
# TODO: This whole block is not release agnostic and Newton is hardcoded. We'll need to detect which release we want to test.
if [ "$OVERCLOUD_MAJOR_UPGRADE" == 1 ] ; then
source ~/stackrc
# Set deploy args for newton deployment:

View File

@ -403,10 +403,11 @@ function delorean_build {
if [ -n "$STABLE_RELEASE" ]; then
# first check if we have a stable release
sed -i -e "s%baseurl=.*%baseurl=https://trunk.rdoproject.org/centos7-$STABLE_RELEASE%" projects.ini
if [ "$STABLE_RELEASE" = "newton" ]; then
sed -i -e "s%distro=.*%distro=$STABLE_RELEASE-rdo%" projects.ini
else
if [ "$STABLE_RELEASE" = "mitaka" ]; then
sed -i -e "s%distro=.*%distro=rpm-$STABLE_RELEASE%" projects.ini
else
# RDO changed the distgit branch for stable releases starting from newton.
sed -i -e "s%distro=.*%distro=$STABLE_RELEASE-rdo%" projects.ini
fi
sed -i -e "s%source=.*%source=stable/$STABLE_RELEASE%" projects.ini
elif [ -n "$FEATURE_BRANCH" ]; then

View File

@ -157,9 +157,12 @@ for JOB_TYPE_PART in $(sed 's/-/ /g' <<< "${TOCI_JOBTYPE:-}") ; do
if [ $TOCI_JOBTYPE == 'undercloud-upgrades' ] ; then
# We want to start by installing an Undercloud
# from the previous stable release.
if [ "$STABLE_RELEASE" = "newton" ]; then
if [ "$STABLE_RELEASE" = "ocata" ]; then
STABLE_RELEASE=newton
elif [ "$STABLE_RELEASE" = "newton" ]; then
STABLE_RELEASE=mitaka
elif [ -z $STABLE_RELEASE ]; then
#TODO(emilien) switch to ocata when released
STABLE_RELEASE=newton
fi
UNDERCLOUD_MAJOR_UPGRADE=1
@ -169,7 +172,12 @@ for JOB_TYPE_PART in $(sed 's/-/ /g' <<< "${TOCI_JOBTYPE:-}") ; do
# We deploy a master Undercloud and an Overcloud with the
# previous release. The pingtest is disable because it won't
# work with the few services deployed.
UPGRADE_RELEASE=newton
if [ "$STABLE_RELEASE" = "ocata" ]; then
UPGRADE_RELEASE=newton
elif [ -z $STABLE_RELEASE ]; then
#TODO(emilien) switch to ocata when released
UPGRADE_RELEASE=newton
fi
OVERCLOUD_MAJOR_UPGRADE=1
RUN_PING_TEST=0
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS --libvirt-type=qemu -t $OVERCLOUD_DEPLOY_TIMEOUT -e $TRIPLEO_ROOT/tripleo-ci/test-environments/multinode_major_upgrade.yaml -r $TRIPLEO_ROOT/tripleo-ci/test-environments/upgrade_roles_data.yaml --overcloud-ssh-user $OVERCLOUD_SSH_USER --validation-errors-nonfatal"