Adjust how we pin (or not) Tempest depending on where we're running

We don't want to pin Tempest if we're running inside the Tempest gate.
This allows their patchsets to be properly tested inside the p-o-i jobs
that are running there.

If we're not running inside the Tempest gate, pin to whatever version
is in TEMPEST_VERSION.

Change-Id: If2221480fb13a69e64adc26fa6bc211bf563bfa8
This commit is contained in:
David Moreau-Simard 2016-12-20 08:48:23 -05:00
parent 70c2da75bf
commit b6243b1617

View File

@ -24,6 +24,7 @@ export HIERA_CONFIG=${HIERA_CONFIG:-${SCRIPT_DIR}/hiera/hiera.yaml}
export MANAGE_HIERA=${MANAGE_HIERA:-true} export MANAGE_HIERA=${MANAGE_HIERA:-true}
export PUPPET_ARGS="${PUPPET_ARGS} --detailed-exitcodes --color=false --test --trace --hiera_config ${HIERA_CONFIG} --logdest ${WORKSPACE}/puppet.log" export PUPPET_ARGS="${PUPPET_ARGS} --detailed-exitcodes --color=false --test --trace --hiera_config ${HIERA_CONFIG} --logdest ${WORKSPACE}/puppet.log"
export DISTRO=$(lsb_release -c -s) export DISTRO=$(lsb_release -c -s)
# Tempest pin due to issue described in https://review.openstack.org/#/c/412511/
export TEMPEST_VERSION=${TEMPEST_VERSION:-'382a2065f3364a36c110bfcc6275a0f8f6894773'} export TEMPEST_VERSION=${TEMPEST_VERSION:-'382a2065f3364a36c110bfcc6275a0f8f6894773'}
# NOTE(pabelanger): Setup facter to know about AFS mirror. # NOTE(pabelanger): Setup facter to know about AFS mirror.
@ -87,6 +88,14 @@ if [ -e /usr/zuul-env/bin/zuul-cloner ] ; then
/usr/zuul-env/bin/zuul-cloner --workspace /tmp --cache-dir /opt/git \ /usr/zuul-env/bin/zuul-cloner --workspace /tmp --cache-dir /opt/git \
git://git.openstack.org openstack/tempest-horizon git://git.openstack.org openstack/tempest-horizon
fi fi
# Pin Tempest to TEMPEST_VERSION unless we're running inside the
# openstack/tempest gate.
if [[ "${ZUUL_PROJECT}" != "openstack/tempest" ]]; then
pushd /tmp/openstack/tempest
git reset --hard $TEMPEST_VERSION
popd
fi
else else
# remove existed checkout before clone # remove existed checkout before clone
$SUDO rm -rf /tmp/openstack/tempest $SUDO rm -rf /tmp/openstack/tempest
@ -97,19 +106,10 @@ else
if uses_debs; then if uses_debs; then
git clone git://git.openstack.org/openstack/tempest-horizon /tmp/openstack/tempest-horizon git clone git://git.openstack.org/openstack/tempest-horizon /tmp/openstack/tempest-horizon
fi fi
fi pushd /tmp/openstack/tempest
pushd /tmp/openstack/tempest
# we don't pin Tempest in Tempest gate, so we can actually run
# real tests in order to fix Tempest.
if [ "$ZUUL_PROJECT" != "openstack/tempest" ] && [ ! -z ${ZUUL_PROJECT+x} ]; then
# openstack/tempest/master interface breaks Trove and more services.
# There is an attempt to fix it here:
# https://review.openstack.org/#/c/412511/
# Let's pin Tempest until the fix works and is merged.
git reset --hard $TEMPEST_VERSION git reset --hard $TEMPEST_VERSION
popd
fi fi
popd
# NOTE(pabelanger): We cache cirros images on our jenkins slaves, check if it # NOTE(pabelanger): We cache cirros images on our jenkins slaves, check if it
# exists. # exists.