From 804ce23825617416a3130866dfe81efa1aa2e024 Mon Sep 17 00:00:00 2001 From: "Christopher A. Snapp" Date: Tue, 31 Dec 2019 10:40:41 -0700 Subject: [PATCH] Add support for canceled/failed integration_test pipeline If a buildkite pipeline fails or is cancelled sufficient signals are NOT passed to the script that was running within a docker container to allow the script to gracefully clean up after itself. As such there is a high potential for orphaned resources to be left running in AWS if this happens to the integration_test pipeline. This commit attempts to add expeditor listeners to cancellation or failures of the integration_test pipeline and attempt to perform the cleanup of orphaned resources associated with the aborted job. Signed-off-by: Christopher A. Snapp --- .expeditor/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.expeditor/config.yml b/.expeditor/config.yml index 3d49bf9703c..ddbde9ed8c7 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -110,6 +110,12 @@ subscriptions: post_commit: true - bash:.expeditor/purge_cdn.sh: post_commit: true + - workload: buildkite_build_canceled:{{agent_id}}:integration_test:* + actions: + - bash:.expeditor/integration_test.pipeline.sh destroy + - workload: buildkite_build_failed:{{agent_id}}:integration_test:* + actions: + - bash:.expeditor/integration_test.pipeline.sh destroy promote: actions: