Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing upgrade params only if the env is set. #80

Merged
merged 1 commit into from
Dec 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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