Skip to content

Commit 23b5667

Browse files
committed
Update integ-test.yml buildspec to optionally allow executing the integration tests from an assumed role.
1 parent 50f9b5e commit 23b5667

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

buildspecs/integ-test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ phases:
77

88
build:
99
commands:
10+
- |
11+
if [ ! -z "$INTEGRATION_TEST_ROLE_ARN" ]; then
12+
ASSUME_ROLE_OUTPUT=`aws sts assume-role --role-arn "$INTEGRATION_TEST_ROLE_ARN" --role-session-name "integration-tests" --query 'Credentials.[AccessKeyId,SecretAccessKey,SessionToken]' --output text`
13+
AWS_ACCESS_KEY_ID=`echo $ASSUME_ROLE_OUTPUT | cut -f1`
14+
AWS_SECRET_ACCESS_KEY=`echo $ASSUME_ROLE_OUTPUT | cut -f2`
15+
AWS_SESSION_TOKEN=`echo $ASSUME_ROLE_OUTPUT | cut -f3`
16+
fi
1017
- mvn clean install -Dskip.unit.tests -P integration-tests -Dfindbugs.skip -Dcheckstyle.skip -T1C
1118
- JAVA_VERSION=$(java -version 2>&1 | grep -i version | cut -d'"' -f2 | cut -d'.' -f1-1)
1219
- echo $JAVA_VERSION

0 commit comments

Comments
 (0)