Skip to content

Commit

Permalink
Fix rollback step condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ppawlowski committed Sep 20, 2023
1 parent 3ef205e commit c63c495
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/fileserver-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,14 @@ jobs:
aws eks update-kubeconfig --region eu-west-1 --name ${{ secrets.EKS_CLUSTER_NAME }}

- name: Update image and wait for deployment to finish
id: update-image
timeout-minutes: 5
run: |
kubectl -n default set image deployment/flowforge-file file-storage=${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.eu-west-1.amazonaws.com/flowforge/file-server:${{ env.image_tag }}
kubectl -n default rollout status deployment/flowforge-file
- name: Rollback failed deployment
if: failure()
if: ${{ failure() && steps.update-image.conclusion == 'failure'}}
run: |
kubectl -n default rollout undo deployment/flowforge-file
kubectl -n default rollout status deployment/flowforge-file
Expand Down Expand Up @@ -175,13 +176,14 @@ jobs:
aws eks update-kubeconfig --region eu-west-1 --name ${{ secrets.EKS_CLUSTER_NAME }}

- name: Update image and wait for deployment to finish
id: update-image
timeout-minutes: 5
run: |
kubectl -n default set image deployment/flowforge-file file-storage=${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.eu-west-1.amazonaws.com/flowforge/file-server:${{ env.image_tag }}
kubectl -n default rollout status deployment/flowforge-file
- name: Rollback failed deployment
if: failure()
if: ${{ failure() && steps.update-image.conclusion == 'failure'}}
run: |
kubectl -n default rollout undo deployment/flowforge-file
kubectl -n default rollout status deployment/flowforge-file
Expand Down

0 comments on commit c63c495

Please sign in to comment.