Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Cloud purge: improve logging, add CLOUD_DELETE_ON_ERROR (elastic…
…#208392) ## Summary When not run through the official way, cloud deployments can get weird names (e.g.: `kibana-pr-false` - from incorrect parameterization through testing: https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/192). This throws a wrench in the gears for the purge script. Although the removals still work, the script exits with status code 1, which fails the pipeline. This PR adds some more resilience to the script, better logging of problematic cases, and a flag to allow removal of problematic cases (if someone manually runs the pipeline with `CLOUD_DELETE_ON_ERROR=1`). Tested: - only fail and log: https://buildkite.com/elastic/kibana-purge-cloud-deployments/builds/6710 - CLOUD_DELETE_ON_ERROR=1, to remove problematic case https://buildkite.com/elastic/kibana-purge-cloud-deployments/builds/6712 (fails for some reason on `keep_...` instance, but never again?) - With the `+e`, and exit code comparison https://buildkite.com/elastic/kibana-purge-cloud-deployments/builds/6713
- Loading branch information