Skip to content

Commit dfa0c5b

Browse files
author
Aaron Suarez
authored
Merge pull request #349 from OperationCode/irving/tag-commit-sha
Use CIRCLE_SHA1 as the image tag instead of BUILD_NUM which is unreliable
2 parents 56a8175 + 99bf8cf commit dfa0c5b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ workflows:
1515
tag: latest
1616
after_build:
1717
- run:
18-
name: Tag and Push with $CIRCLE_BUILD_NUM
18+
name: Tag and Push with $CIRCLE_SHA1
1919
command: |
2020
IMAGE_ID=operationcode/resources-api
21-
docker tag ${IMAGE_ID}:latest ${IMAGE_ID}:${CIRCLE_BUILD_NUM}
22-
docker push ${IMAGE_ID}:${CIRCLE_BUILD_NUM}
21+
docker tag ${IMAGE_ID}:latest ${IMAGE_ID}:${CIRCLE_SHA1}
22+
docker push ${IMAGE_ID}:${CIRCLE_SHA1}
2323
requires:
2424
- build_test
2525
filters:
@@ -29,7 +29,7 @@ workflows:
2929

3030
# Deploy the new docker image to the AWS EKS cluster, staging namespace
3131
- aws-eks/update-container-image:
32-
container-image-updates: 'app=operationcode/resources-api:${CIRCLE_BUILD_NUM}'
32+
container-image-updates: 'app=operationcode/resources-api:${CIRCLE_SHA1}'
3333
cluster-name: 'operationcode-backend'
3434
namespace: 'operationcode-staging'
3535
resource-name: 'deployment/resources-api'

0 commit comments

Comments
 (0)