Keep environment for cloner in apply test sudo

The zuul cloner needs the ZUUL_* env vars when setting up projects
for the new apply integration test.

Also, add some more debugging to both versions of the test.

Change-Id: I486b19cecd034250068e4a59604e1e0ca90ed83d
This commit is contained in:
James E. Blair 2014-09-15 11:12:01 -07:00
parent c2458d305b
commit 542e170b81
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/bash -ex
ROOT=$(readlink -fn $(dirname $0))
MODULE_PATH="${ROOT}/modules:/etc/puppet/modules"
@ -43,6 +43,8 @@ sudo mv /tmp/hosts /etc/hosts
sudo mkdir -p /var/run/puppet
sudo bash -x ./install_modules.sh
echo "Running apply test on these hosts:"
find applytest -name 'puppetapplytest*.final' -print0
find applytest -name 'puppetapplytest*.final' -print0 | \
xargs -0 -P $(nproc) -n 1 -I filearg \
sudo puppet apply --modulepath=${MODULE_PATH} --noop --verbose --debug filearg > /dev/null

View File

@ -26,7 +26,7 @@ clonemap:
EOF
# Add puppet modules that should be installed to the end of this list
sudo /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
sudo -E /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
git://git.openstack.org \
openstack-infra/puppet-storyboard
@ -67,6 +67,8 @@ sudo mv /tmp/hosts /etc/hosts
sudo mkdir -p /var/run/puppet
sudo -E bash -x ./install_modules.sh
echo "Running apply test on these hosts:"
find applytest -name 'puppetapplytest*.final' -print0
find applytest -name 'puppetapplytest*.final' -print0 | \
xargs -0 -P $(nproc) -n 1 -I filearg \
sudo puppet apply --modulepath=${MODULE_PATH} --noop --verbose --debug filearg > /dev/null