tests/int: Add separate resource cleanup step
Introduce a destroy-only mode in the test runner to run terraform destroy for the respective cloud provider configurations. This can be used to destroy cloud resources without going through the whole provision-test process. Add a new step in github actions workflow to run the test binary in destoy-only mode at the very end irrespective of the result of the previous steps. This ensures that the infrastructure is always destroyed, even if the CI job is cancelled. Signed-off-by: Sunny <darkowlzz@protonmail.com>
This commit is contained in:
@@ -17,6 +17,14 @@ test-azure:
|
||||
test-gcp:
|
||||
$(MAKE) test PROVIDER_ARG="-provider gcp"
|
||||
|
||||
destroy:
|
||||
go test -timeout $(TEST_TIMEOUT) -v ./ $(GO_TEST_ARGS) $(PROVIDER_ARG) -destroy-only
|
||||
|
||||
destroy-azure:
|
||||
$(MAKE) destroy PROVIDER_ARG="-provider azure"
|
||||
|
||||
destroy-gcp:
|
||||
$(MAKE) destroy PROVIDER_ARG="-provider gcp"
|
||||
|
||||
sops-check:
|
||||
ifeq ($(shell which sops),)
|
||||
|
||||
Reference in New Issue
Block a user