Skip to content

Commit

Permalink
[cft] Exit 1 if purge error (elastic#137733)
Browse files Browse the repository at this point in the history
* [cft] Exit 1 if purge error

This triggers a job failure if the purge-cloud-deployments script
encounters an error.  I'm attempting to debug why an instance was stuck
online and hoping this will make future issues easier to spot.

* set exit code instead of exiting
  • Loading branch information
jbudz authored Aug 2, 2022
1 parent 12bbc0d commit 943cde8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .buildkite/scripts/steps/cloud/purge_deployments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ for (const deployment of prDeployments) {
} catch (ex) {
console.error(ex.toString());
// deploymentsToPurge.push(deployment); // TODO should we delete on error?
process.exitCode = 1;
}
}

Expand All @@ -57,5 +58,6 @@ for (const deployment of deploymentsToPurge) {
});
} catch (ex) {
console.error(ex.toString());
process.exitCode = 1;
}
}

0 comments on commit 943cde8

Please sign in to comment.