File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 build :
1010 commands :
1111 - echo Building the Docker image...
12- - docker build --build-arg ECR_ACCOUNT_ID=${ECR_ACCOUNT_ID} -t ${FIPS_REPOSITORY_URI}:latest .
12+ - >
13+ docker build
14+ --build-arg ECR_ACCOUNT_ID=${ECR_ACCOUNT_ID}
15+ --tag ${FIPS_REPOSITORY_URI}:latest
16+ .
17+
1318 - docker image push --all-tags ${FIPS_REPOSITORY_URI}
1419 post_build :
1520 commands :
Original file line number Diff line number Diff line change @@ -12,7 +12,13 @@ phases:
1212 - echo $FIPS_REPOSITORY_URI
1313 - echo $COMMIT_HASH_SHORT
1414 - echo $BRANCH_NAME
15- - docker build --build-arg ECR_ACCOUNT_ID=${ECR_ACCOUNT_ID} --tag ${FIPS_REPOSITORY_URI}:${COMMIT_HASH_SHORT} --tag ${FIPS_REPOSITORY_URI}:${BRANCH_NAME} .
15+ - >
16+ docker build
17+ --build-arg ECR_ACCOUNT_ID=${ECR_ACCOUNT_ID}
18+ --tag ${FIPS_REPOSITORY_URI}:${COMMIT_HASH_SHORT}
19+ --tag ${FIPS_REPOSITORY_URI}:${BRANCH_NAME}
20+ .
21+
1622 - docker image push --all-tags ${FIPS_REPOSITORY_URI}
1723 post_build :
1824 commands :
Original file line number Diff line number Diff line change @@ -11,7 +11,14 @@ phases:
1111 - PATCH_TAG=${TAG_NAME#"v"}
1212 - MINOR_TAG=${PATCH_TAG%.*}
1313 - MAJOR_TAG=${MINOR_TAG%.*}
14- - docker build --build-arg ECR_ACCOUNT_ID=${ECR_ACCOUNT_ID} -t ${FIPS_REPOSITORY_URI}:${PATCH_TAG} -t ${FIPS_REPOSITORY_URI}:${MINOR_TAG} -t ${FIPS_REPOSITORY_URI}:${MAJOR_TAG} .
14+ - >
15+ docker build
16+ --build-arg ECR_ACCOUNT_ID=${ECR_ACCOUNT_ID}
17+ --tag ${FIPS_REPOSITORY_URI}:${PATCH_TAG}
18+ --tag ${FIPS_REPOSITORY_URI}:${MINOR_TAG}
19+ --tag ${FIPS_REPOSITORY_URI}:${MAJOR_TAG}
20+ .
21+
1522 - docker image push --all-tags ${FIPS_REPOSITORY_URI}
1623 post_build :
1724 commands :
You can’t perform that action at this time.
0 commit comments