Skip to content

Commit 1e73511

Browse files
mergify[bot]pchila
andauthored
Fix ess respawn on retry (#11375) (#11396)
* Fix ESS creation script on step retry * fixup! Fix ESS creation script on step retry (cherry picked from commit 60eb3ed) Co-authored-by: Paolo Chilà <[email protected]>
1 parent b6122e9 commit 1e73511

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.buildkite/bk.integration-fips.pipeline.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ steps:
5454
FIPS: "true"
5555
EC_ENDPOINT: "https://api.staging.elastic-gov.com"
5656
ESS_REGION: "us-gov-east-1"
57+
TF_VAR_deployment_template_id: "aws-general-purpose"
5758
TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-cloud-fips:git-${BUILDKITE_COMMIT:0:12}"
59+
TF_VAR_docker_images_name_suffix: "-fips"
5860
TEST_PACKAGE: "github.com/elastic/elastic-agent/testing/integration/ess"
5961
command: |
6062
buildkite-agent artifact download build/distributions/** . --step 'packaging-amd64-fips'
@@ -86,7 +88,9 @@ steps:
8688
FIPS: "true"
8789
EC_ENDPOINT: "https://api.staging.elastic-gov.com"
8890
ESS_REGION: "us-gov-east-1"
91+
TF_VAR_deployment_template_id: "aws-general-purpose"
8992
TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-cloud-fips:git-${BUILDKITE_COMMIT:0:12}"
93+
TF_VAR_docker_images_name_suffix: "-fips"
9094
TEST_PACKAGE: "github.com/elastic/elastic-agent/testing/integration/ess"
9195
command: |
9296
buildkite-agent artifact download build/distributions/** . --step 'packaging-arm64-fips'

.buildkite/scripts/steps/integration_tests_tf.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ if [ -z "$TEST_SUDO" ]; then
2020
exit 1
2121
fi
2222

23+
ESS_REGION=${ESS_REGION:-""}
24+
2325
# Override the stack version from `.package-version` contents
2426
# There is a time when the current snapshot is not available on cloud yet, so we cannot use the latest version automatically
2527
# This file is managed by an automation (mage integration:UpdateAgentPackageVersion) that check if the snapshot is ready.
@@ -36,8 +38,8 @@ fi
3638
# BUILDKITE_RETRY_COUNT > 0 for the retries
3739
if [[ "${BUILDKITE_RETRY_COUNT}" -gt 0 ]]; then
3840
echo "~~~ The steps is retried, starting the ESS stack again"
39-
trap 'ess_down' EXIT
40-
ess_up "$STACK_VERSION" "$STACK_BUILD_ID" || (echo -e "^^^ +++\nFailed to start ESS stack")
41+
trap 'ess_down "$ESS_REGION"' EXIT
42+
ess_up "$STACK_VERSION" "$STACK_BUILD_ID" "$ESS_REGION"
4143
else
4244
# For the first run, we start the stack in the start_ess.sh step and it sets the meta-data
4345
echo "~~~ Receiving ESS stack metadata"

0 commit comments

Comments
 (0)