Skip to content

Commit e3160f8

Browse files
authored
Fix/issue 380 (#381)
* Remove tag param when the value is not passed * Update value for tests * Revert tests and update way to pass tags * Remove debug
1 parent 3468d30 commit e3160f8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/scripts/create_repo.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ else
2121
ENCRYPTION_CONFIGURATION+=",kmsKey=${AWS_ECR_EVAL_ENCRYPTION_KMS_KEY}"
2222
fi
2323

24-
if [ -z "${AWS_ECR_EVAL_REPO_TAG}" ]; then
25-
AWS_ECR_EVAL_REPO_TAG="{\"Key\": \"Name\", \"Value\": \""${AWS_ECR_EVAL_REPO}\""}"
24+
if [ -n "${AWS_ECR_EVAL_REPO_TAG}" ]; then
25+
set -- "$@" --tags
26+
set -- "$@" "${AWS_ECR_EVAL_REPO_TAG}"
2627
fi
27-
2828
aws ecr describe-repositories \
2929
--profile "${AWS_ECR_EVAL_PROFILE_NAME}" \
3030
--region "${AWS_ECR_EVAL_REGION}" \
@@ -36,5 +36,5 @@ else
3636
--image-tag-mutability "${AWS_ECR_EVAL_IMAGE_TAG_MUTABILITY}" \
3737
--image-scanning-configuration "${IMAGE_SCANNING_CONFIGURATION}" \
3838
--encryption-configuration "${ENCRYPTION_CONFIGURATION}" \
39-
--tags "${AWS_ECR_EVAL_REPO_TAG}"
39+
"$@"
4040
fi

0 commit comments

Comments
 (0)