Default behaviour now is to create a GCP image if missing.

We previously had 'use image' as a default, but not 'create image', which is inconsistent and leads to unexpected failures.
This commit is contained in:
Marc CARRE committed 2017-02-08 14:15:59 +00:00
1 parent 69398a9d7e
commit ef8b576742
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ if [ -n "$TEST_AND_PUBLISH" ]; then
install_ansible >>"$TEST_VMS_SETUP_OUTPUT_FILE" 2>&1
# Only attempt to create GCP image in first container, wait for it to be created otherwise:
[ "$CIRCLE_NODE_INDEX" == "0" ] && export CREATE_IMAGE=1
[ "$CIRCLE_NODE_INDEX" != "0" ] && export CREATE_IMAGE=0
# Provision and configure testing VMs:
cd "$SRCDIR/test" # Ensures we generate Terraform state files in the right folder, for later use by integration tests.
+2 -2
View File
@@ -36,7 +36,7 @@ KUBERNETES_CNI_VERSION=${KUBERNETES_CNI_VERSION:-0.3.0.1}
IMAGE_NAME=${IMAGE_NAME:-"$(echo "$APP-docker$DOCKER_VERSION-k8s$KUBERNETES_VERSION-k8scni$KUBERNETES_CNI_VERSION" | sed -e 's/[\.\_]*//g')"}
DISK_NAME_PREFIX=${DISK_NAME_PREFIX:-$NAME}
USE_IMAGE=${USE_IMAGE:-1}
CREATE_IMAGE=${CREATE_IMAGE:-}
CREATE_IMAGE=${CREATE_IMAGE:-1}
CREATE_IMAGE_TIMEOUT_IN_SECS=${CREATE_IMAGE_TIMEOUT_IN_SECS:-600}
# Lifecycle flags:
SKIP_CONFIG=${SKIP_CONFIG:-}
@@ -142,7 +142,7 @@ function wait_for_image() {
# shellcheck disable=SC2155
function create_image() {
if [ -n "$CREATE_IMAGE" ]; then
if [[ "$CREATE_IMAGE" == 1 ]]; then
greenly echo "> Creating GCP image $IMAGE_NAME..."
local begin_img=$(date +%s)
local num_hosts=1