Skip to content

Commit

Permalink
chore: consume latest generate-test-config.sh script from ci-support (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
palpatim committed Jul 31, 2020
1 parent 21b9f9e commit eb7c3ee
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Scripts/generate-test-config.sh
Expand Up @@ -5,15 +5,15 @@
##################################################
# CANONICAL SOURCE OF THIS FILE IS
# https://github.com/aws-amplify/amplify-ci-support/blob/master/src/integ_test_resources/common/scripts/generate-test-config.sh
#
#
# As of this writing (06-May-2020), we manually copy this file into the CI
# support directories for the projects that use it:
# - https://github.com/aws-amplify/aws-sdk-ios/tree/master/Scripts/generate-test-config.sh
# - https://github.com/aws-amplify/aws-sdk-android/tree/master/build-support/generate-test-config.sh
#
#
# From there, this script will be invoked by the CircleCI build process during
# test setup, or it may be invoked manually for local integration test runs
#
#


##################################################
Expand Down Expand Up @@ -101,7 +101,7 @@ REQUIREMENTS
and available on your PATH:
- Python - v3.7 or higher, accessible as 'python3'
(https://www.python.org/)
If you use the -a option to assume the test execution role prior to
generating the test configuration file, you must also have the following
utilities installed:
Expand Down Expand Up @@ -196,6 +196,7 @@ cmd_quiet_flag="--quiet"
[[ -n $platform ]] || die "'platform' not specified"

[[ -n $region ]] || die "'region' not specified"
export AWS_DEFAULT_REGION=${region}


##################################################
Expand Down Expand Up @@ -253,7 +254,7 @@ function resolve_credentials {
[[ $LOG_LEVEL -ge $LOG_LEVEL_TRACE ]] && set +x

local circleci_execution_role_arn
circleci_execution_role_arn=$(aws ssm get-parameter --name '/mobile-sdk/ios/common/circleci_execution_role' | jq -r .Parameter.Value)
circleci_execution_role_arn=$(aws ssm get-parameter --name "/mobile-sdk/${platform}/common/circleci_execution_role" | jq -r .Parameter.Value)
readonly circleci_execution_role_arn

local assume_role_creds
Expand All @@ -275,8 +276,6 @@ function resolve_credentials {
log_debug "Using credentials in environment"
fi

export AWS_DEFAULT_REGION=${region}

# Restore verbose logging
[[ $LOG_LEVEL -lt $LOG_LEVEL_TRACE ]] || set -x
}
Expand Down

0 comments on commit eb7c3ee

Please sign in to comment.