@@ -93,14 +93,14 @@ pre_command_hook="$PWD/hooks/pre-command"
93
93
}
94
94
95
95
@test " ECR: Applies lifecycle policy to existing repositories with aws-cli v2" {
96
+ export AWS_REGION=" ap-southeast-2"
96
97
export BUILDKITE_ORGANIZATION_SLUG=" example-org"
97
98
export BUILDKITE_PIPELINE_SLUG=" example-pipeline"
98
99
local expected_repository_name=" build-cache/example-org/example-pipeline"
99
100
100
101
stub aws \
101
102
" --version : echo 'aws-cli/2.4.15 Python/3.9.2 Linux/5.10.76-linuxkit botocore/1.24.3'" \
102
- " sts get-caller-identity --query \" Account\" --output text : echo 1234567891012" \
103
- " configure get region : echo ap-southeast-2" \
103
+ " sts get-caller-identity --query Account --output text : echo 1234567891012" \
104
104
" ecr get-login-password --region ap-southeast-2 : echo secure-ecr-password" \
105
105
" ecr describe-repositories --repository-names ${expected_repository_name} --output text --query repositories[0].registryId : echo looked up repository" \
106
106
" ecr describe-repositories --repository-names ${expected_repository_name} --output text --query repositories[0].repositoryArn : echo arn:aws:ecr:ap-southeast-2:1234567891012:repository/${expected_repository_name} " \
@@ -133,15 +133,15 @@ pre_command_hook="$PWD/hooks/pre-command"
133
133
}
134
134
135
135
@test " ECR: Builds new images with tags with aws-cli v2" {
136
+ export AWS_REGION=" ap-southeast-2"
136
137
export BUILDKITE_ORGANIZATION_SLUG=" example-org"
137
138
export BUILDKITE_PIPELINE_SLUG=" example-pipeline"
138
139
local expected_repository_name=" build-cache/example-org/example-pipeline"
139
140
local repository_uri=" 1234567891012.dkr.ecr.ap-southeast-2.amazonaws.com/${expected_repository_name} "
140
141
141
142
stub aws \
142
143
" --version : echo 'aws-cli/2.4.15 Python/3.9.2 Linux/5.10.76-linuxkit botocore/1.24.3'" \
143
- " sts get-caller-identity --query \" Account\" --output text : echo 1234567891012" \
144
- " configure get region : echo ap-southeast-2" \
144
+ " sts get-caller-identity --query Account --output text : echo 1234567891012" \
145
145
" ecr get-login-password --region ap-southeast-2 : echo secure-ecr-password" \
146
146
" ecr describe-repositories --repository-names ${expected_repository_name} --output text --query repositories[0].registryId : echo looked up repository" \
147
147
" ecr describe-repositories --repository-names ${expected_repository_name} --output text --query repositories[0].repositoryArn : echo arn:aws:ecr:ap-southeast-2:1234567891012:repository/${expected_repository_name} " \
0 commit comments