From ee0cfeeb58fe51ae745c7959cd518ddaf9fc8c47 Mon Sep 17 00:00:00 2001 From: Piyush Nimbalkar Date: Fri, 1 Dec 2017 17:06:45 -0800 Subject: [PATCH] Passing upgrade params only if the env is set. - Allowing focus param, to selectively run tests --- deployments/deploy-aws.sh | 20 ++++++++++++++++---- deployments/deploy-ssh.sh | 16 ++++++++++++++-- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/deployments/deploy-aws.sh b/deployments/deploy-aws.sh index 4cdb4a5a3..86c8397f6 100755 --- a/deployments/deploy-aws.sh +++ b/deployments/deploy-aws.sh @@ -1,17 +1,30 @@ #!/bin/bash -x EXTRA_ARGS="" +UPGRADE_ARGS="" if [ -n "${VERBOSE}" ]; then VERBOSE="--v" fi +if [ -z "${SCALE_FACTOR}" ]; then + SCALE_FACTOR="10" +fi + if [ -n "${SKIP_TESTS}" ]; then EXTRA_ARGS="--skip=$SKIP_TESTS $EXTRA_ARGS" fi -if [ -z "${SCALE_FACTOR}" ]; then - SCALE_FACTOR="10" +if [ -n "${FOCUS_TESTS}" ]; then + EXTRA_ARGS="--focus=$FOCUS_TESTS $EXTRA_ARGS" +fi + +if [ -n "${STORAGE_UPGRADE_VERSION}" ]; then + UPGRADE_ARGS="--storage-driver-upgrade-version=$STORAGE_UPGRADE_VERSION" +fi + +if [ -n "${STORAGE_BASE_VERSION}" ]; then + UPGRADE_ARGS="--storage-driver-base-version=$STORAGE_BASE_VERSION $UPGRADE_ARGS" fi if [ -z "${TORPEDO_IMG}" ]; then @@ -112,8 +125,7 @@ spec: "--spec-dir", "../drivers/scheduler/k8s/specs", "--node-driver", "aws", "--scale-factor", "$SCALE_FACTOR", - "--storage-driver-upgrade-version", "$STORAGE_UPGRADE_VERSION", - "--storage-driver-base-version", "$STORAGE_BASE_VERSION" ] + "$UPGRADE_ARGS" ] tty: true env: - name: AWS_ACCESS_KEY_ID diff --git a/deployments/deploy-ssh.sh b/deployments/deploy-ssh.sh index 9fce7614a..3067cbfef 100755 --- a/deployments/deploy-ssh.sh +++ b/deployments/deploy-ssh.sh @@ -1,6 +1,7 @@ #!/bin/bash -x EXTRA_ARGS="" +UPGRADE_ARGS="" if [ -n "${VERBOSE}" ]; then VERBOSE="--v" @@ -14,6 +15,18 @@ if [ -n "${SKIP_TESTS}" ]; then EXTRA_ARGS="--skip=$SKIP_TESTS $EXTRA_ARGS" fi +if [ -n "${FOCUS_TESTS}" ]; then + EXTRA_ARGS="--focus=$FOCUS_TESTS $EXTRA_ARGS" +fi + +if [ -n "${STORAGE_UPGRADE_VERSION}" ]; then + UPGRADE_ARGS="--storage-driver-upgrade-version=$STORAGE_UPGRADE_VERSION" +fi + +if [ -n "${STORAGE_BASE_VERSION}" ]; then + UPGRADE_ARGS="--storage-driver-base-version=$STORAGE_BASE_VERSION $UPGRADE_ARGS" +fi + if [ -z "${TORPEDO_IMG}" ]; then TORPEDO_IMG="portworx/torpedo:latest" echo "Using default torpedo image: ${TORPEDO_IMG}" @@ -89,8 +102,7 @@ spec: "--spec-dir", "../drivers/scheduler/k8s/specs", "--node-driver", "ssh", "--scale-factor", "$SCALE_FACTOR", - "--storage-driver-upgrade-version", "$STORAGE_UPGRADE_VERSION", - "--storage-driver-base-version", "$STORAGE_BASE_VERSION" ] + "$UPGRADE_ARGS" ] tty: true env: - name: TORPEDO_SSH_USER