Files
devstack-gate/devstack-vm-gate-dev.sh
James E. Blair f32f06b50b Make devstack nodes jenkins slaves.
Add them as nodes with the tag "devstack-IMAGE" where IMAGE is, eg,
oneiric, with a single executor.  Change the reap job to delete
these jenkins nodes.  Change the delete script to simply mark them
for deletion.  It should then be called by a new job that is a
post-build step for the devstack gate job.  Another new job should
be called as the first build step in the devstack gate, and it should
invoke devstack-vm-inprogress.py to disable the node that the job
just started running on.  In this manner, we end up with single-use
jenkins slaves.

Change the gate script to expect to be run the host itself, so it
no longer needs to ssh and scp/rsync files around.

Add a new script, devstack-vm-gate-wrap.sh, which assists running
the gate job on a separate devstack host, as is currently done,
to test it out without requiring the full Jenkins infrastructure.

Change-Id: I28902918406670163d32ae7c2a644055233dc1fa
2012-05-22 01:36:08 +00:00

28 lines
656 B
Bash
Executable File

#!/bin/bash -x
# Simulate what Jenkins does with the devstack-gate script.
NODE_IP_ADDR=$1
cat >$WORKSPACE/test-env.sh <<EOF
export WORKSPACE=/home/jenkins/workspace
export DEVSTACK_GATE_PREFIX=wip-
export SKIP_DEVSTACK_GATE_PROJECT=1
export GERRIT_BRANCH=master
export GERRIT_PROJECT=testing
export JOB_NAME=test
export BUILD_NUMBER=42
export GERRIT_CHANGE_NUMBER=1234
export GERRIT_PATCHSET_NUMBER=1
EOF
rsync -az --delete $WORKSPACE/ $NODE_IP_ADDR:workspace/
RETVAL=$?
if [ $RETVAL != 0 ]; then
exit $RETVAL
fi
rm $WORKSPACE/test-env.sh
ssh $NODE_IP_ADDR '. workspace/test-env.sh && workspace/devstack-gate/devstack-vm-gate-wrap.sh'
#RETVAL=$?