File tree Expand file tree Collapse file tree 8 files changed +40
-3
lines changed Expand file tree Collapse file tree 8 files changed +40
-3
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,13 @@ parameters:
179
179
default : " "
180
180
description : |
181
181
The path to the .json file containing the repository policy to be applied to a specified repository in AWS ECR.
182
+ aws_domain :
183
+ type : string
184
+ default : " amazonaws.com"
185
+ description : >
186
+ The AWS domain for your region, e.g in China, the AWS domain is amazonaws.com.cn
187
+ The default value is amazonaws.com
188
+
182
189
auth :
183
190
description : |
184
191
The authentication method used to access your AWS account. Import the aws-cli orb in your config and
@@ -255,3 +262,4 @@ steps:
255
262
lifecycle_policy_path : <<parameters.lifecycle_policy_path>>
256
263
public_registry_alias : <<parameters.public_registry_alias>>
257
264
build_path : <<parameters.build_path>>
265
+ aws_domain : <<parameters.aws_domain>>
Original file line number Diff line number Diff line change @@ -98,6 +98,13 @@ parameters:
98
98
buildx builders to be saved with Docker Layer Caching, the builder must explicitly be named.
99
99
Specify the a builder name with this parameter. This parameter defaults to "default-builder" if none is provided.
100
100
101
+ aws_domain :
102
+ type : string
103
+ default : " amazonaws.com"
104
+ description : >
105
+ The AWS domain for your region, e.g in China, the AWS domain is amazonaws.com.cn
106
+ The default value is amazonaws.com
107
+
101
108
steps :
102
109
- run :
103
110
name : Build Docker Image with buildx
@@ -117,5 +124,6 @@ steps:
117
124
ORB_STR_LIFECYCLE_POLICY_PATH : <<parameters.lifecycle_policy_path>>
118
125
ORB_STR_PUBLIC_REGISTRY_ALIAS : <<parameters.public_registry_alias>>
119
126
ORB_EVAL_BUILD_PATH : <<parameters.build_path>>
127
+ ORB_STR_AWS_DOMAIN : <<parameters.aws_domain>>
120
128
command : <<include(scripts/docker_buildx.sh)>>
121
129
no_output_timeout : <<parameters.no_output_timeout>>
Original file line number Diff line number Diff line change @@ -27,6 +27,12 @@ parameters:
27
27
description : Set to true if building and pushing an image to a Public Registry on ECR.
28
28
default : false
29
29
30
+ aws_domain :
31
+ type : string
32
+ default : " amazonaws.com"
33
+ description : >
34
+ AWS domain, China regions will require override.
35
+
30
36
steps :
31
37
- run :
32
38
name : Log into Amazon ECR with profile <<parameters.profile_name>>
35
41
ORB_ENV_REGISTRY_ID : <<parameters.registry_id>>
36
42
ORB_STR_REGION : <<parameters.region>>
37
43
ORB_BOOL_PUBLIC_REGISTRY : <<parameters.public_registry>>
44
+ ORB_STR_AWS_DOMAIN : <<parameters.aws_domain>>
38
45
command : <<include(scripts/ecr_login.sh)>>
Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ parameters:
30
30
description : >
31
31
The public registry alias for your public repositories. This parameter is required if pushing to a public repository
32
32
It can be found in the Amazon ECR console > Public Registries.
33
+ aws_domain :
34
+ type : string
35
+ default : " amazonaws.com"
36
+ description : >
37
+ AWS domain, China regions will require override.
33
38
steps :
34
39
- run :
35
40
name : Push image to AWS ECR
40
45
ORB_BOOL_PUBLIC_REGISTRY : <<parameters.public_registry>>
41
46
ORB_STR_PUBLIC_REGISTRY_ALIAS : <<parameters.public_registry_alias>>
42
47
ORB_ENV_REGISTRY_ID : << parameters.registry_id >>
48
+ ORB_STR_AWS_DOMAIN : <<parameters.aws_domain>>
43
49
command : << include(scripts/push_image.sh) >>
Original file line number Diff line number Diff line change @@ -189,6 +189,12 @@ parameters:
189
189
provide the aws-cli/setup command to authenticate with your preferred method. View examples for more information.
190
190
type : steps
191
191
192
+ aws_domain :
193
+ type : string
194
+ default : " amazonaws.com"
195
+ description : >
196
+ AWS domain, China regions will require override.
197
+
192
198
steps :
193
199
- build_and_push_image :
194
200
registry_id : <<parameters.registry_id>>
@@ -221,3 +227,4 @@ steps:
221
227
repo_policy_path : <<parameters.repo_policy_path>>
222
228
build_path : <<parameters.build_path>>
223
229
auth : <<parameters.auth>>
230
+ aws_domain : <<parameters.aws_domain>>
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ ORB_STR_REGION="$(circleci env subst "${ORB_STR_REGION}")"
3
3
ORB_STR_REPO=" $( circleci env subst " ${ORB_STR_REPO} " ) "
4
4
ORB_STR_TAG=" $( circleci env subst " ${ORB_STR_TAG} " ) "
5
5
ORB_EVAL_PATH=" $( eval echo " ${ORB_EVAL_PATH} " ) "
6
- ORB_VAL_ACCOUNT_URL=" ${! ORB_ENV_REGISTRY_ID} .dkr.ecr.${ORB_STR_REGION} .amazonaws.com"
6
+ ORB_STR_AWS_DOMAIN=" $( echo " ${ORB_STR_AWS_DOMAIN} " | circleci env subst) "
7
+ ORB_VAL_ACCOUNT_URL=" ${! ORB_ENV_REGISTRY_ID} .dkr.ecr.${ORB_STR_REGION} .${ORB_STR_AWS_DOMAIN} "
7
8
ORB_STR_PUBLIC_REGISTRY_ALIAS=" $( circleci env subst " ${ORB_STR_PUBLIC_REGISTRY_ALIAS} " ) "
8
9
ORB_STR_EXTRA_BUILD_ARGS=" $( echo " ${ORB_STR_EXTRA_BUILD_ARGS} " | circleci env subst) "
9
10
ORB_EVAL_BUILD_PATH=" $( eval echo " ${ORB_EVAL_BUILD_PATH} " ) "
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
ORB_STR_REGION=" $( circleci env subst " ${ORB_STR_REGION} " ) "
3
3
ORB_STR_PROFILE_NAME=" $( circleci env subst " ${ORB_STR_PROFILE_NAME} " ) "
4
- ORB_VAL_ACCOUNT_URL=" ${! ORB_ENV_REGISTRY_ID} .dkr.ecr.${ORB_STR_REGION} .amazonaws.com "
4
+ ORB_VAL_ACCOUNT_URL=" ${! ORB_ENV_REGISTRY_ID} .dkr.ecr.${ORB_STR_REGION} .${ORB_STR_AWS_DOMAIN} "
5
5
ECR_COMMAND=" ecr"
6
6
7
7
if [ -z " ${! ORB_ENV_REGISTRY_ID} " ]; then
Original file line number Diff line number Diff line change 2
2
ORB_STR_REPO=" $( circleci env subst " ${ORB_STR_REPO} " ) "
3
3
ORB_STR_TAG=" $( circleci env subst " ${ORB_STR_TAG} " ) "
4
4
ORB_STR_REGION=" $( circleci env subst " ${ORB_STR_REGION} " ) "
5
- ORB_VAL_ACCOUNT_URL=" ${! ORB_ENV_REGISTRY_ID} .dkr.ecr.${ORB_STR_REGION} .amazonaws.com "
5
+ ORB_VAL_ACCOUNT_URL=" ${! ORB_ENV_REGISTRY_ID} .dkr.ecr.${ORB_STR_REGION} .${ORB_STR_AWS_DOMAIN} "
6
6
ORB_STR_PUBLIC_REGISTRY_ALIAS=" $( circleci env subst " ${ORB_STR_PUBLIC_REGISTRY_ALIAS} " ) "
7
7
8
8
if [ -z " ${! ORB_ENV_REGISTRY_ID} " ]; then
You can’t perform that action at this time.
0 commit comments