Skip to content

Commit 3ba2222

Browse files
mergify[bot]pchila
andauthored
Fix ess respawn on retry (#11375) (#11395)
* 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 d136eb8 commit 3ba2222

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
@@ -62,7 +62,9 @@ steps:
6262
FIPS: "true"
6363
EC_ENDPOINT: "https://api.staging.elastic-gov.com"
6464
ESS_REGION: "us-gov-east-1"
65+
TF_VAR_deployment_template_id: "aws-general-purpose"
6566
TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-cloud-fips:git-${BUILDKITE_COMMIT:0:12}"
67+
TF_VAR_docker_images_name_suffix: "-fips"
6668
TEST_PACKAGE: "github.com/elastic/elastic-agent/testing/integration/ess"
6769
command: |
6870
buildkite-agent artifact download build/distributions/** . --step 'packaging-amd64-fips'
@@ -94,7 +96,9 @@ steps:
9496
FIPS: "true"
9597
EC_ENDPOINT: "https://api.staging.elastic-gov.com"
9698
ESS_REGION: "us-gov-east-1"
99+
TF_VAR_deployment_template_id: "aws-general-purpose"
97100
TF_VAR_integration_server_docker_image: "docker.elastic.co/beats-ci/elastic-agent-cloud-fips:git-${BUILDKITE_COMMIT:0:12}"
101+
TF_VAR_docker_images_name_suffix: "-fips"
98102
TEST_PACKAGE: "github.com/elastic/elastic-agent/testing/integration/ess"
99103
command: |
100104
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 || "${FORCE_ESS_CREATE:-false}" == "true" ]]; 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)