Merge branch '2.1' into 2.2

This commit is contained in:
Markus Mäkelä
2018-03-27 07:25:00 +03:00
3 changed files with 13 additions and 9 deletions

View File

@ -52,6 +52,12 @@ if [ "${try_already_running}" == "yes" ]; then
fi
if [ "$already_running" != "ok" ]; then
# destroying existing box
if [ -d "$MDBCI_VM_PATH/${name}" ]; then
${mdbci_dir}/mdbci destroy $name
fi
# Just in case some old lock file left
rm -rf ${snapshot_lock_file}
eval "cat <<EOF
$(<${script_dir}/templates/build.json.template)
@ -64,11 +70,6 @@ $(<${script_dir}/templates/build.json.template)
touch ~/vagrant_lock
echo $JOB_NAME-$BUILD_NUMBER >> ~/vagrant_lock
# destroying existing box
if [ -d "$MDBCI_VM_PATH/${name}" ]; then
${mdbci_dir}/mdbci destroy $name
fi
# starting VM for build
echo "Generating build VM template"
${mdbci_dir}/mdbci --override --template $MDBCI_VM_PATH/$name.json generate $name
@ -104,14 +105,11 @@ if [ $? -eq 0 ] ; then
# exit 1
fi
${script_dir}/create_remote_repo.sh
${script_dir}/copy_repos.sh
echo "Removing locks and destroying VM"
cd $MDBCI_VM_PATH/$name
if [ "$try_already_running" == "yes" ] ; then
echo "Release lock for already running VM"
rm $snapshot_lock_file