Skip to content

Commit 5be065b

Browse files
committed
Updating to codebuild
1 parent 25efcb4 commit 5be065b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

buildspec.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ phases:
66
- echo Logging in to Amazon ECR...
77
- aws --version
88
- $(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)
9-
- IMAGE_TAG=$CODEBUILD_BUILD_ID
9+
- IMAGE_TAG=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7)
10+
- echo Getting image tag name
11+
- echo $CODEBUILD_RESOLVED_SOURCE_VERSION
12+
- echo $IMAGE_TAG
1013
build:
1114
commands:
1215
- echo Build started on `date`
1316
- echo Building the Docker image...
1417
- docker build -t $REPOSITORY_URI:latest .
15-
- echo $IMAGE_TAG
1618
- docker tag $REPOSITORY_URI:latest $REPOSITORY_URI:$IMAGE_TAG
1719
post_build:
1820
commands:

0 commit comments

Comments
 (0)