Skip to content

Commit

Permalink
[CI] config fix for deploying to none default namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
rsmets committed Jul 28, 2022
1 parent e78b20e commit e54d430
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ jobs:
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 >>:<< parameters.image_tag >>
kubectl set image deployment/<< parameters.deployment >> << parameters.deployment >>=${AWS_ECR_URL}/<< parameters.repo >>:<< parameters.image_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
ATTEMPTS=0
ROLLOUT_STATUS_CMD="kubectl rollout status deployment/<< parameters.deployment >>"
ROLLOUT_STATUS_CMD="kubectl rollout status deployment/<< parameters.deployment >> -n << parameters.namespace >>"
until $ROLLOUT_STATUS_CMD || [ $ATTEMPTS -eq 60 ]; do
$ROLLOUT_STATUS_CMD
ATTEMPTS=$((attempts + 1))
Expand Down

0 comments on commit e54d430

Please sign in to comment.