-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathintegration-tests-buildspec.yml
More file actions
30 lines (29 loc) · 1.51 KB
/
integration-tests-buildspec.yml
File metadata and controls
30 lines (29 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# For documentation see here - https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html
version: 0.2
phases:
pre_build:
commands:
- temp_role=$(aws sts assume-role --role-arn "arn:aws:iam::$AWS_ACCOUNT_ID_NONPROD:role/$PIPELINE_BUILD_ROLE" --role-session-name "CodeBuildSession")
- export AWS_ACCESS_KEY_ID=$(echo $temp_role | jq -r .Credentials.AccessKeyId)
- export AWS_SECRET_ACCESS_KEY=$(echo $temp_role | jq -r .Credentials.SecretAccessKey)
- export AWS_SESSION_TOKEN=$(echo $temp_role | jq -r .Credentials.SessionToken)
- make docker-hub-signin
- |
if [[ -z "$BLUE_GREEN_ENVIRONMENT" ]]; then
make docker-pull NAME=tester DIGEST=sha256:8c90f5292a78a8ced10b7644b1269174798db2fc92b5d01a7e9dac966e13b88c
docker tag $(make _docker-get-reg)/tester@sha256:8c90f5292a78a8ced10b7644b1269174798db2fc92b5d01a7e9dac966e13b88c $(make _docker-get-reg)/tester:latest
export BLUE_GREEN_ENVIRONMENT=$(make terraform-output STACKS=blue-green-link ENVIRONMENT=$SHARED_ENVIRONMENT OPTS='-raw connected_blue_green_environment' | tail -n1)
else
make docker-pull NAME=tester VERSION=latest
fi
build:
commands:
- echo $BLUE_GREEN_ENVIRONMENT
- make integration-test PROFILE=$PROFILE ENVIRONMENT=$ENVIRONMENT TAG=$TAG PARALLEL_TEST_COUNT=20
reports:
PytestIntegrationReport:
files:
- "testresults.json"
base-directory: $CODEBUILD_SRC_DIR/test/integration
discard-paths: yes
file-format: CUCUMBERJSON