From: Gregory Meno Date: Thu, 21 Apr 2016 21:32:17 +0000 (+0000) Subject: run the salt that vagrant would have exe X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F363%2Fhead;p=ceph-build.git run the salt that vagrant would have exe Calamari gets built by salt. We had used vagrant to manage the machine and such but now we'll let jenkins do it and remove vagrant from the equation. Signed-off-by: Gregory Meno --- diff --git a/calamari-server-trusty/build/build b/calamari-server-trusty/build/build index 14ea327b..6a9f5448 100644 --- a/calamari-server-trusty/build/build +++ b/calamari-server-trusty/build/build @@ -1,13 +1,24 @@ set -e echo "Building ${BRANCH}" rm -f ${WORKSPACE}/*.deb ${WORKSPACE}/calamari-repo-trusty.tar.gz -cd ${WORKSPACE}/calamari/vagrant/trusty-build && vagrant destroy -f -vagrant up -vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +cd ${WORKSPACE}/calamari/ + +sudo apt-get -y install python-software-properties +sudo add-apt-repository -y ppa:saltstack/salt +sudo apt-get update +wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add - +sudo ssh-keygen -f /root/.ssh/id_rsa -N '' +sudo su -c 'cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys' +ssh-keyscan $(hostname -f)| sudo tee -a /root/.ssh/known_hosts +l: +sudo apt-get -y install salt-minion salt-common python-jinja2 + +sudo salt-call --local --file-root=$(pwd)/vagrant/trusty-build/salt/roots state.highstate | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out + + errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) rm /tmp/${BUILD_TAG}.out if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi -vagrant destroy -f cd $WORKSPACE rm -rf $BRANCH mkdir $BRANCH