Skip to content

Commit

Permalink
Passing upgrade params only if the env is set.
Browse files Browse the repository at this point in the history
- Allowing focus param, to selectively run tests
  • Loading branch information
Piyush Nimbalkar authored and piyush-nimbalkar committed Dec 3, 2017
1 parent 9046da0 commit ee0cfee
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
20 changes: 16 additions & 4 deletions deployments/deploy-aws.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 14 additions & 2 deletions deployments/deploy-ssh.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash -x

EXTRA_ARGS=""
UPGRADE_ARGS=""

if [ -n "${VERBOSE}" ]; then
VERBOSE="--v"
Expand All @@ -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}"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ee0cfee

Please sign in to comment.