Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
test(e2e): remove resources afterwards
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Oct 27, 2020
1 parent 6f1c026 commit 80fbbbc
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/test-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,20 @@ jobs:
- name: Get logs
if: failure()
run: node cli logs
# - name: Clean up End-to-End test resources
# if: always()
# run: |
# node cli drop-athena-resources
# node cli purge-iot-user-policy-principals
# node cli purge-cas -i `cat certificates/**/rootCA.id`
# # Purge Buckets does not remove the source-code bucket (because it will be populate again by the CDK command)
# node cli purge-buckets
# npx cdk -a 'node --unhandled-rejections=strict dist/cdk/cloudformation-test.js' destroy -f '*'
# # Delete sourcecode bucket
# SOURCE_CODE_BUCKET=`aws cloudformation describe-stacks --stack-name $STACK_NAME-sourcecode | jq -r '.Stacks[0].Outputs[] | select(.OutputKey == "bucketName") | .OutputValue'`
# aws s3 rb s3://$SOURCE_CODE_BUCKET --force
# # Delete the sourceode stack
# npx cdk -a 'node --unhandled-rejections=strict dist/cdk/cloudformation-sourcecode.js' destroy -f '*'
- name: Clean up End-to-End test resources
if: always()
run: |
node cli drop-athena-resources
node cli purge-iot-user-policy-principals
node cli purge-cas -i `cat certificates/**/rootCA.id`
# Purge Buckets does not remove the source-code bucket (because it will be populate again by the CDK command)
node cli purge-buckets
npx cdk -a 'node --unhandled-rejections=strict dist/cdk/cloudformation-test.js' destroy -f '*'
# Delete sourcecode bucket
SOURCE_CODE_BUCKET=`aws cloudformation describe-stacks --stack-name $STACK_NAME-sourcecode | jq -r '.Stacks[0].Outputs[] | select(.OutputKey == "bucketName") | .OutputValue'`
aws s3 rb s3://$SOURCE_CODE_BUCKET --force
# Delete the sourceode stack
npx cdk -a 'node --unhandled-rejections=strict dist/cdk/cloudformation-sourcecode.js' destroy -f '*'
release:
needs: tests
Expand Down

0 comments on commit 80fbbbc

Please sign in to comment.