diff --git a/circle.yml b/circle.yml index f590e330..cd208015 100644 --- a/circle.yml +++ b/circle.yml @@ -34,6 +34,8 @@ dependencies: - bin/setup-circleci-secrets "$SECRET_PASSWORD" - mkdir -p $(dirname $SRCDIR) - cp -r $(pwd)/ $SRCDIR + - cd $SRCDIR/test; ./gce.sh make_template: + parallel: false test: override: diff --git a/test/gce.sh b/test/gce.sh index f2d7be82..55a577de 100755 --- a/test/gce.sh +++ b/test/gce.sh @@ -11,7 +11,7 @@ set -e : ${SSH_KEY_FILE:=$HOME/.ssh/gce_ssh_key} : ${PROJECT:=positive-cocoa-90213} : ${IMAGE:=ubuntu-14-04} -: ${TEMPLATE_NAME:=test-template-4} +: ${TEMPLATE_NAME:=test-template-6} : ${ZONE:=us-central1-a} : ${NUM_HOSTS:=5} SUFFIX="" @@ -90,6 +90,7 @@ function copy_hosts { # Create new set of VMs function setup { destroy + names="$(vm_names)" gcloud compute instances create $names --image $TEMPLATE_NAME --zone $ZONE gcloud compute config-ssh --ssh-key-file $SSH_KEY_FILE @@ -159,5 +160,8 @@ destroy) ;; make_template) - make_template + # see if template exists + if ! gcloud compute images list | grep $PROJECT | grep $TEMPLATE_NAME; then + make_template + fi esac