Skip to content

Commit

Permalink
chore: Add conditional check before uninstalling and deleting resourc…
Browse files Browse the repository at this point in the history
…es in branch-deploy.yaml (#4080)
  • Loading branch information
ppawlowski authored Jul 1, 2024
1 parent dfc4e5a commit 42e8c15
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/branch-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ jobs:
- name: Remove resources
run: |
helm uninstall --namespace "pr-${{ env.PR_NUMBER }}" flowfuse-pr-${{ env.PR_NUMBER }}
sleep 15
kubectl delete namespace "pr-${{ env.PR_NUMBER }}"
if helm list -n "pr-${{ env.PR_NUMBER }}" --filter "^flowfuse-pr-${{ env.PR_NUMBER }}$" | grep "flowfuse-pr-${{ env.PR_NUMBER }}"; then
helm uninstall --namespace "pr-${{ env.PR_NUMBER }}" flowfuse-pr-${{ env.PR_NUMBER }}
sleep 15
kubectl delete namespace "pr-${{ env.PR_NUMBER }}"
else
echo "Release flowfuse-pr-${{ env.PR_NUMBER }} does not exist"
fi

0 comments on commit 42e8c15

Please sign in to comment.