-
Notifications
You must be signed in to change notification settings - Fork 134
/
buildspec_integ.yml
33 lines (30 loc) · 1.43 KB
/
buildspec_integ.yml
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
31
32
33
version: 0.2
phases:
install:
runtime-versions:
golang: 1.13
pre_build:
commands:
- echo Running the integration test
build:
commands:
# Enforce STS regional endpoints
- export AWS_STS_REGIONAL_ENDPOINTS=regional
- export CW_INTEG_VALIDATOR_IMAGE_BASE=${AWS_ACCOUNT}.dkr.ecr.us-west-2.amazonaws.com/cw-integ-validator
- export S3_INTEG_VALIDATOR_IMAGE_BASE=${AWS_ACCOUNT}.dkr.ecr.us-west-2.amazonaws.com/s3-integ-validator
# Get the default credentials and set as environment variables
- 'CREDS=`curl 169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`'
- 'export AWS_ACCESS_KEY_ID=`echo $CREDS | jq -r .AccessKeyId`'
- 'export AWS_SECRET_ACCESS_KEY=`echo $CREDS | jq -r .SecretAccessKey`'
- 'export AWS_SESSION_TOKEN=`echo $CREDS | jq -r .Token`'
# Pull the image that we built and pushed in the `Build` stage
- aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${AWS_ACCOUNT}.dkr.ecr.${AWS_REGION}.amazonaws.com
- docker pull ${AWS_ACCOUNT}.dkr.ecr.${AWS_REGION}.amazonaws.com/amazon/aws-for-fluent-bit-test:latest
- docker tag ${AWS_ACCOUNT}.dkr.ecr.${AWS_REGION}.amazonaws.com/amazon/aws-for-fluent-bit-test amazon/aws-for-fluent-bit:latest
# List the images to do a double check
- docker images
# Command to run the integration test
- make integ
artifacts:
files:
- '**/*'