Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/int: Add separate resource cleanup step #489

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

darkowlzz
Copy link
Contributor

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.

Based on fluxcd/pkg#712.

Example CI run https://github.com/fluxcd/image-reflector-controller/actions/runs/7449742708/job/20267063711#step:15:46 where the job is cancelled and the provisioned resources are deleted in the new 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 <[email protected]>
@darkowlzz darkowlzz added the area/testing Testing related issues and pull requests label Jan 8, 2024
@darkowlzz darkowlzz merged commit f194659 into main Jan 8, 2024
8 of 9 checks passed
@darkowlzz darkowlzz deleted the int-test-destroy-only branch January 8, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Testing related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants