File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ AWS_ECR_EVAL_AWS_PROFILE="$(eval echo "${AWS_ECR_STR_AWS_PROFILE}")"
7
7
# pull the image manifest from ECR
8
8
set -x
9
9
MANIFEST=" $( aws ecr batch-get-image --repository-name " ${AWS_ECR_EVAL_REPO} " --image-ids imageTag=" ${AWS_ECR_EVAL_SOURCE_TAG} " --query ' images[].imageManifest' --output text --profile " ${AWS_ECR_EVAL_AWS_PROFILE} " ) "
10
- EXISTING_TAGS=" $( aws ecr list-images --repository-name " ${AWS_ECR_EVAL_REPO} " --filter " tagStatus=TAGGED" --profile " ${AWS_ECR_EVAL_AWS_PROFILE} " ) "
10
+ # only list images when needed
11
+ if [ " ${AWS_ECR_BOOL_SKIP_WHEN_TAGS_EXIST} " -eq 1 ]; then
12
+ EXISTING_TAGS=" $( aws ecr list-images --repository-name " ${AWS_ECR_EVAL_REPO} " --filter " tagStatus=TAGGED" --profile " ${AWS_ECR_EVAL_AWS_PROFILE} " ) "
13
+ fi
11
14
IFS=" ," read -ra ECR_TAGS <<< " ${AWS_ECR_EVAL_TARGET_TAG}"
12
15
13
16
for tag in " ${ECR_TAGS[@]} " ; do
You can’t perform that action at this time.
0 commit comments