Skip to content

Commit

Permalink
[CI] updated (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsmets authored Aug 8, 2022
1 parent 9659fb7 commit 845bdb9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ jobs:
type: string
deployment:
type: string
namespace:
type: string
default: default
docker: # Referencing the python image here, see https://github.com/CircleCI-Public/aws-eks-orb/issues/52#issuecomment-1006838213
- image: cimg/python:3.10
steps:
Expand All @@ -159,7 +162,10 @@ jobs:
cluster-name: << parameters.cluster-name >>
- run:
command: |
kubectl set image deployment/<< parameters.deployment >> << parameters.deployment >>=${AWS_ECR_URL}/<< parameters.repo >>:"dev-${CIRCLE_BRANCH}-${CIRCLE_PREVIOUS_BUILD_NUM}"
# Set the image tag then ensure a rollout is triggered. Thanks to the deployment pod spec being set to always pull this should grab the latest image, even with the same tag.
# ref: https://stackoverflow.com/a/55914480/2631728
kubectl set image deployment/<< parameters.deployment >> << parameters.deployment >>=${AWS_ECR_URL}/<< parameters.repo >>:"dev-latest" -n << parameters.namespace >>
kubectl rollout restart deploy << parameters.deployment >> -n << parameters.namespace >>
# Check deployment rollout status every 10 seconds (max 10 minutes) until complete.
# ref: https://www.jeffgeerling.com/blog/2018/updating-kubernetes-deployment-and-waiting-it-roll-out-shell-script
Expand Down Expand Up @@ -201,7 +207,10 @@ jobs:
cluster-name: << parameters.cluster-name >>
- run:
command: |
# Set the image tag then ensure a rollout is triggered. Thanks to the deployment pod spec being set to always pull this should grab the latest image, even with the same tag.
# ref: https://stackoverflow.com/a/55914480/2631728
kubectl set image deployment/<< parameters.deployment >> << parameters.deployment >>=${AWS_ECR_URL}/<< parameters.repo >>:sandbox-"${CIRCLE_TAG}" -n << parameters.namespace >>
kubectl rollout restart deploy << parameters.deployment >> -n << parameters.namespace >>
# Check deployment rollout status every 10 seconds (max 10 minutes) until complete.
# ref: https://www.jeffgeerling.com/blog/2018/updating-kubernetes-deployment-and-waiting-it-roll-out-shell-script
Expand Down

0 comments on commit 845bdb9

Please sign in to comment.