Merge "Revert "Update ci-script to enable TripleO gate dependencies""

This commit is contained in:
Jenkins 2017-03-20 19:19:07 +00:00 committed by Gerrit Code Review
commit d2a7b3f9c5
3 changed files with 28 additions and 74 deletions

View File

@ -24,62 +24,32 @@ OVB_SETTINGS_FILE=$5
OVB_CREDS_FILE=$6
PLAYBOOK=$7
JOB_TYPE=$8
VIRTHOST=localhost
if [ "$JOB_TYPE" = "gate" ] || \
[ "$JOB_TYPE" = "periodic" ] || \
[ "$JOB_TYPE" = "dlrn-gate" ]; then
unset REL_TYPE
if [ "$RELEASE" = "master-tripleo-ci" ]; then
# we don't have a local mirror for the tripleo-ci images
unset CI_ENV
fi
elif [ "$JOB_TYPE" = "dlrn-gate-check" ]; then
# setup a test patch to be built
export ZUUL_HOST=review.openstack.org
export ZUUL_CHANGES=openstack/tripleo-ui:master:refs/changes/25/422025/2
unset REL_TYPE
if [ "$RELEASE" = "master-tripleo-ci" ]; then
# we don't have a local mirror for the tripleo-ci images
unset CI_ENV
fi
elif [ "$JOB_TYPE" = "promote" ]; then
export REL_TYPE=$LOCATION
else
echo "Job type must be one of the following:"
echo " * gate - for gating changes on tripleo-quickstart or -extras"
echo " * promote - for running promotion jobs"
echo " * periodic - for running periodic jobs"
echo " * dlrn-gate - for gating upstream changes"
echo " * dlrn-gate-check - for gating upstream changes"
exit 1
fi
# (trown) This is so that we ensure separate ssh sockets for
# concurrent jobs. Without this, two jobs running in parallel
# would try to use the same undercloud-stack socket.
socketdir=$(mktemp -d /tmp/sockXXXXXX)
export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r
# preparation steps to run with the gated roles
source $WORKSPACE/tripleo-quickstart/ci-scripts/include-gate-changes.sh
# we need to run differently (and twice) when gating upstream changes
if [ "$JOB_TYPE" = "dlrn-gate" ] || [ "$JOB_TYPE" = "dlrn-gate-check" ]; then
# TODO: Add dlrn-gate section in upcoming review
else
if [ "$JOB_TYPE" = "gate" ]; then
bash quickstart.sh \
--bootstrap \
--working-dir $WORKSPACE/ \
--tags all \
--no-clone \
--config $WORKSPACE/$HW_ENV_DIR/network_configs/$NETWORK_ISOLATION/config_files/$CONFIG \
--extra-vars @$OVB_SETTINGS_FILE \
--extra-vars @$OVB_CREDS_FILE \
--extra-vars @$WORKSPACE/$HW_ENV_DIR/network_configs/$NETWORK_ISOLATION/env_settings.yml \
--playbook $PLAYBOOK \
--bootstrap \
--playbook gate-quickstart.yml \
--release ${CI_ENV:+$CI_ENV/}$RELEASE${REL_TYPE:+-$REL_TYPE} \
$OPT_ADDITIONAL_PARAMETERS \
$VIRTHOST
localhost
fi
bash quickstart.sh \
--bootstrap \
--working-dir $WORKSPACE/ \
--tags all \
--no-clone \
--config $WORKSPACE/$HW_ENV_DIR/network_configs/$NETWORK_ISOLATION/config_files/$CONFIG \
--extra-vars @$OVB_SETTINGS_FILE \
--extra-vars @$OVB_CREDS_FILE \
--extra-vars @$WORKSPACE/$HW_ENV_DIR/network_configs/$NETWORK_ISOLATION/env_settings.yml \
--playbook $PLAYBOOK \
--release ${CI_ENV:+$CI_ENV/}$RELEASE${REL_TYPE:+-$REL_TYPE} \
$OPT_ADDITIONAL_PARAMETERS \
localhost

View File

@ -49,7 +49,16 @@ socketdir=$(mktemp -d /tmp/sockXXXXXX)
export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r
# preparation steps to run with the gated roles
source $WORKSPACE/tripleo-quickstart/ci-scripts/include-gate-changes.sh
if [ "$JOB_TYPE" = "gate" ] || [ "$JOB_TYPE" = "dlrn-gate-check" ]; then
bash quickstart.sh \
--working-dir $WORKSPACE/ \
--no-clone \
--bootstrap \
--playbook gate-quickstart.yml \
--release ${CI_ENV:+$CI_ENV/}$RELEASE${REL_TYPE:+-$REL_TYPE} \
$OPT_ADDITIONAL_PARAMETERS \
$VIRTHOST
fi
# we need to run differently (and twice) when gating upstream changes
if [ "$JOB_TYPE" = "dlrn-gate" ] || [ "$JOB_TYPE" = "dlrn-gate-check" ]; then

View File

@ -1,25 +0,0 @@
#!/bin/bash
# CI script that includes gate changes and dependencies to be run in jobs.
# This script should be run before a quickstart.sh run testing the change.
# Usage: include-gate-change.sh <release> <job_type> <virthost>
# preparation steps to run with the gated roles
if [ "$JOB_TYPE" = "gate" ] || [ "$JOB_TYPE" = "dlrn-gate-check" ]; then
bash quickstart.sh \
--working-dir $WORKSPACE/ \
--no-clone \
--bootstrap \
--playbook gate-quickstart.yml \
--release ${CI_ENV:+$CI_ENV/}$RELEASE${REL_TYPE:+-$REL_TYPE} \
$OPT_ADDITIONAL_PARAMETERS \
$VIRTHOST
fi
# Rename tripleo-quickstart directory to include the gated change
if [ -d $WORKSPACE/tripleo-quickstart-gate-repo ]; then
mv $WORKSPACE/tripleo-quickstart $WORKSPACE/tripleo-quickstart-old;
mv $WORKSPACE/tripleo-quickstart-gate-repo $WORKSPACE/tripleo-quickstart;
cp $WORKSPACE/tripleo-quickstart-old/requirements* $WORKSPACE/tripleo-quickstart/;
fi