Skip to content

Commit

Permalink
feat(integ): use configurable version of Deadline for integration tes…
Browse files Browse the repository at this point in the history
…ts (#160)
  • Loading branch information
kozlove-aws authored Nov 19, 2020
1 parent 494b1b0 commit 263021c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
6 changes: 6 additions & 0 deletions integ/scripts/bash/rfdk-integ-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ mkdir -p $INTEG_TEMP_DIR
# Stage deadline from script
$BASH_SCRIPTS/stage-deadline.sh

# Extract the Deadline version to use for Deadline installations on the farm.
# Tests allow not specifying or specifying a partial version string such as "10.1.11". After staging, we
# obtain the fully resolved version (e.g. "10.1.11.5") which is required to determine
# the matching AWS Portal AMI IDs
export DEADLINE_VERSION=$(node -e $'const json = require(process.argv[1] + \'/manifest.json\'); console.log(json.version)' "$DEADLINE_STAGING_PATH")

# If executing worker fleet tests, find Deadline AMIs based on supplied version
if [ ! "${SKIP_deadline_03_repository_TEST-}" = true ]; then
source $BASH_SCRIPTS/fetch-worker-amis.sh
Expand Down
2 changes: 1 addition & 1 deletion integ/scripts/bash/run-e2e-automated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# ROLE_ARN - The role that will be assumed to deploy the integ tests
# ROLE_SESSION_NAME - A name for the assume role session
# ROLE_EXTERNAL_ID - The external ID matching the assume role
# DEADLINE_VERSION - Optional, will default to the latest Deadline version if not set, otherwise the specified version will be used.

set -euo pipefail

Expand All @@ -32,7 +33,6 @@ refreshcreds() {

# Basic integ test configuration
export SKIP_TEST_CONFIG=true
export DEADLINE_VERSION="10.1.11.5"

# Setup the hook that runs before any interactions with AWS to refresh the credentials being used.
# There is a 1 hour timeout on these credentials that cannot be adjusted.
Expand Down
5 changes: 0 additions & 5 deletions integ/scripts/bash/set-test-variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,3 @@ elif [ $(ls "$DEADLINE_STAGING_PATH/manifest.json" 2> /dev/null) ]; then
#If path is set, extract the Deadline version to use for Deadline installations on the farm. This will override any other Deadline version provided.
export DEADLINE_VERSION=$(node -e $'const json = require(process.argv[1] + \'/manifest.json\'); console.log(json.version)' "$DEADLINE_STAGING_PATH")
fi

# Set Deadline version to default if not overridden
if [ -z ${DEADLINE_VERSION+x} ]; then
export DEADLINE_VERSION="10.1.9.2"
fi
6 changes: 5 additions & 1 deletion integ/scripts/bash/stage-deadline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ set -euo pipefail

# Check if Deadline assets are staged at configured path
if [ ! $(ls "$DEADLINE_STAGING_PATH/manifest.json" 2> /dev/null) ]; then
# If DEADLINE_VERSION is not defined set empty value to get the latest version
if [ -z ${DEADLINE_VERSION+x} ]; then
export DEADLINE_VERSION=""
fi
# Stage Deadline assets
npx stage-deadline --deadlineInstallerURI "s3://thinkbox-installers/Deadline/$DEADLINE_VERSION/Linux/DeadlineClient-$DEADLINE_VERSION-linux-x64-installer.run" --dockerRecipesURI "s3://thinkbox-installers/DeadlineDocker/$DEADLINE_VERSION/DeadlineDocker-$DEADLINE_VERSION.tar.gz" --output "$DEADLINE_STAGING_PATH"
npx stage-deadline --output "$DEADLINE_STAGING_PATH" $DEADLINE_VERSION
fi

exit 0
2 changes: 1 addition & 1 deletion integ/test-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
export USER_ACCEPTS_SSPL_FOR_RFDK_TESTS=false

# Version of Deadline to install on farm resources.
# - If not set here, will default to 10.1.9.2
# - If not set here, will default to the latest
export DEADLINE_VERSION

# Qualified path to staged Deadline assets.
Expand Down

0 comments on commit 263021c

Please sign in to comment.