Skip to content

Commit

Permalink
ci: delete namespace even if step fails
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfouquet committed Oct 5, 2023
1 parent 8e8d66e commit 797dd40
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ jobs:
- name: Lint workflows
if: github.ref != 'refs/heads/master'
continue-on-error: true
run: |
# Create test namespace
TEST_NAMESPACE=$GITHUB_SHA
kubectl create namespace $TEST_NAMESPACE
# Create copy of Workflows files to change their namespaces
mkdir test
# Make step failing
#mkdir test
cp workflows/ test/workflows/ -r
# Deploy templates in the test namespace
Expand All @@ -82,6 +84,9 @@ jobs:
./argo-linux-amd64 lint templates/ -n $TEST_NAMESPACE
./argo-linux-amd64 lint test/workflows/ -n $TEST_NAMESPACE
- name: Delete Test namespace
if: github.ref != 'refs/heads/master'
run: |
# Delete the test namespace
kubectl delete namespaces $TEST_NAMESPACE
Expand Down

0 comments on commit 797dd40

Please sign in to comment.