From 46d2193b00ca70619b174a5e5dc86f3f44e1980b Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 1 Nov 2013 17:41:12 -0400 Subject: [PATCH] trigger devstack-gate test as early as possible if we have changes to devstack-gate we need need to run this as early as possible. So do this the second we've decided that we need to run devstack gate in our project list. Change-Id: I60464965a2e4cea5e1c85ea8833e98a8471fa5f1 --- devstack-vm-gate-wrap.sh | 42 +++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index cdc9da9e..f08ff5f3 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -157,6 +157,18 @@ function setup_project { fi } +function reboot_devstack_gate { + export RE_EXEC="true" + echo "This build includes a change to the devstack gate; re-execing this script." + + fix_disk_layout + + mkdir -p $BASE/new + cd $BASE/new + setup_project openstack-infra/devstack-gate master + exec $GATE_SCRIPT_DIR/devstack-vm-gate-wrap.sh +} + function setup_workspace { local base_branch=$1 local DEST=$2 @@ -400,14 +412,6 @@ PROJECTS="openstack/tempest $PROJECTS" PROJECTS="openstack/oslo.config $PROJECTS" PROJECTS="openstack/oslo.messaging $PROJECTS" -# Set this variable to skip updating the devstack-gate project itself. -# Useful in development so you can edit scripts in place and run them -# directly. Do not set in production. -# Normally not set, and we do include devstack-gate with the rest of -# the projects. -if [ -z "$SKIP_DEVSTACK_GATE_PROJECT" ]; then - PROJECTS="openstack-infra/devstack-gate $PROJECTS" -fi export BASE=/opt/stack @@ -422,6 +426,20 @@ export ZUUL_URL=${ZUUL_URL:-http://zuul.openstack.org/p} rm -rf logs mkdir -p logs +# Set this variable to skip updating the devstack-gate project itself. +# Useful in development so you can edit scripts in place and run them +# directly. Do not set in production. +# Normally not set, and we do include devstack-gate with the rest of +# the projects. +if [ -z "$SKIP_DEVSTACK_GATE_PROJECT" ]; then + PROJECTS="openstack-infra/devstack-gate $PROJECTS" + # Also, if we're testing devstack-gate, re-exec this script once so + # that we can test the new version of it. + if [[ $ZUUL_CHANGES =~ "openstack-infra/devstack-gate" ]] && [[ $RE_EXEC != "true" ]]; then + reboot_devstack_gate + fi +fi + # Set to 1 to run the Tempest test suite export DEVSTACK_GATE_TEMPEST=${DEVSTACK_GATE_TEMPEST:-0} @@ -547,14 +565,6 @@ else $WORKSPACE/logs/devstack-gate-setup-workspace-new.txt fi -# Also, if we're testing devstack-gate, re-exec this script once so -# that we can test the new version of it. -if [[ $ZUUL_CHANGES =~ "openstack-infra/devstack-gate" ]] && [[ $RE_EXEC != "true" ]]; then - export RE_EXEC="true" - echo "This build includes a change to the devstack gate; re-execing this script." - exec $GATE_SCRIPT_DIR/devstack-vm-gate-wrap.sh -fi - # this looks like we are unDRY (does that make us wet?), however we want to do # as much as possible after the RE_EXEC as that will happen with the new script # and not the old script. The long term evolution is to make setup_workspace be