Commit eae1e861 authored by Łukasz Nowak's avatar Łukasz Nowak

deploy-test: Allow to use local slapos clone

Also expose location of playbook.
parent 471e6927
......@@ -20,6 +20,7 @@ command =
if [ ! -d srv/public ] ; then
dest=`echo ../*/srv/public`
cp ${playbook:output} $dest/playbook.tar.gz &&
cp ${slapos-tarball:output} $dest/slapos.tar.gz &&
cp ${standalone-local-playbook:location} $dest/standalone-local-playbook
fi
......
......@@ -6,6 +6,7 @@ parts =
template-deploy-test
runTestSuite_py
playbook
slapos-tarball
[runTestSuite_py]
recipe = zc.recipe.egg
......@@ -25,21 +26,29 @@ command =
ln -s ${buildout:bin-directory}/pythonwitheggs ${:location}/python2.7
update-command = ${:command}
[playbook]
[tarball]
recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
environment = export PATH=${tar:location}/bin:${gzip:location}/bin:$PATH
location = ${buildout:parts-directory}/${:_buildout_section_name_}
output = ${:location}/playbook.tar.gz
command =
${:environment}
rm -fr ${:location}
mkdir -p ${:location}
cd ${slapos-package:location}/playbook
cd ${:input}
tar czf ${:output} .
update-command = ${:command}
[playbook]
<= tarball
input = ${slapos-package:location}/playbook
output = ${:location}/playbook.tar.gz
[slapos-tarball]
<= tarball
input = ${slapos-repository:repository}
output = ${:location}/slapos.tar.gz
[test-location]
base = ${slapos-package:location}
......
......@@ -2178,6 +2178,7 @@ fi
sed -i "s/key = slapos-global-key/key = slapos-global-official-vifib-key/g" /etc/opt/slapcache.cfg
DFILE="/tmp/tmpplaybook_unstable$(basename $0).$$/"
PLAYBOOK_DIRECTORY=$DFILE
TFILE="archive.tar.gz"
mkdir -p $DFILE
cd $DFILE
......@@ -2185,7 +2186,16 @@ wget -O $TFILE http://10.0.2.100/playbook.tar.gz
tar -xzvf $TFILE
rm $TFILE
DFILE="/test/slapos/"
TFILE="archive.tar.gz"
mkdir -p $DFILE
cd $DFILE
wget -O $TFILE http://10.0.2.100/slapos.tar.gz
tar -xzvf $TFILE
rm $TFILE
clear
echo "Starting Ansible playbook:"
cd $PLAYBOOK_DIRECTORY
ansible-playbook $TEST_YML_PATH -i hosts --connection=local
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment