Skip to content

Commit

Permalink
[SYS-4885] add merge master buildspec for proper latest tagging (#39)
Browse files Browse the repository at this point in the history
* [CIVP-19203] add merge master for proper latest tagging

* add newlines to eof
  • Loading branch information
shelbrudy authored Aug 28, 2019
1 parent 1652f3a commit 72b7180
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
14 changes: 14 additions & 0 deletions buildspec/merge_master.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 0.2
phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION)
build:
commands:
- echo Building the Docker image...
- docker build -t ${REPOSITORY_URI}:latest .
- docker push ${REPOSITORY_URI}
post_build:
commands:
- echo Build completed!
2 changes: 1 addition & 1 deletion buildspec/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ phases:
post_build:
commands:
- echo Build completed!
- printf '{"tag":"%s"}' $COMMIT_HASH_SHORT > build.json
- printf '{"tag":"%s"}' $COMMIT_HASH_SHORT > build.json
4 changes: 2 additions & 2 deletions buildspec/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ phases:
- PATCH_TAG=${TAG_NAME#"v"} # major.minor.patch
- MINOR_TAG=${PATCH_TAG%.*} # major.minor
- MAJOR_TAG=${MINOR_TAG%.*} # major
- docker build -t ${REPOSITORY_URI}:${PATCH_TAG} -t ${REPOSITORY_URI}:${MINOR_TAG} -t ${REPOSITORY_URI}:${MAJOR_TAG} -t ${REPOSITORY_URI}:latest .
- docker build -t ${REPOSITORY_URI}:${PATCH_TAG} -t ${REPOSITORY_URI}:${MINOR_TAG} -t ${REPOSITORY_URI}:${MAJOR_TAG} .
- docker push ${REPOSITORY_URI}
post_build:
commands:
- echo Build completed!
- printf '{"tag":"%s"}' $TAG_NAME > build.json
- printf '{"tag":"%s"}' $TAG_NAME > build.json

0 comments on commit 72b7180

Please sign in to comment.