File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,18 +5,15 @@ phases:
55 - echo Logging in to Amazon ECR...
66 - aws ecr get-login-password --region ${AWS_DEFAULT_REGION} | docker login --username AWS --password-stdin ${FIPS_REPOSITORY_URI}
77 - export COMMIT_HASH_SHORT="$(echo $COMMIT_HASH | cut -c 1-7)"
8- # Extract ECR account ID and region from FIPS_REPOSITORY_URI
98 - export ECR_ACCOUNT_ID="$(echo $FIPS_REPOSITORY_URI | cut -d'.' -f1)"
109 - export ECR_REGION="$(echo $FIPS_REPOSITORY_URI | cut -d'.' -f4)"
1110 - echo Building the Docker image...
1211 - echo $FIPS_REPOSITORY_URI
1312 - echo $COMMIT_HASH_SHORT
1413 - echo $BRANCH_NAME
15- - echo "ECR Account ID : $ECR_ACCOUNT_ID"
16- - echo "ECR Region : $ECR_REGION"
14+ - echo "ECR Account ID:" $ECR_ACCOUNT_ID
15+ - echo "ECR Region:" $ECR_REGION
1716 - docker build --build-arg ECR_ACCOUNT_ID=${ECR_ACCOUNT_ID} --build-arg ECR_REGION=${ECR_REGION} --tag ${FIPS_REPOSITORY_URI}:${COMMIT_HASH_SHORT} --tag ${FIPS_REPOSITORY_URI}:${BRANCH_NAME} .
18- # We have a life cycle policy in place to expire and delete images from dev branches,
19- # so there are no issues with pushing as many of these images as there may be.
2017 - docker image push --all-tags ${FIPS_REPOSITORY_URI}
2118 post_build :
2219 commands :
You can’t perform that action at this time.
0 commit comments