From 52ff9b08c8859fa9100a07b1d3e02b173a8515a8 Mon Sep 17 00:00:00 2001 From: Alex Szabo Date: Thu, 14 Mar 2024 10:45:27 +0100 Subject: [PATCH] [Ops] Propagate DRY_RUN to gpctl-promote (#178658) ## Summary We've had some issues with the weekly scheduled serverless release after we've switched to a direct trigger to `gpctl-promote`. Although we've tried a few options, and we've probably found the solution, but we can still go for sure, and try a dry-run cross trigger. This wasn't possible before, but https://github.com/elastic/gpctl/pull/261 should now respect DRY_RUN env vars coming in. This PR propagates those variables, so we can test the setup. --- .buildkite/pipelines/emergency_release.yml | 1 + .../serverless/create_deploy_tag/generate_gpctl_trigger.ts | 1 + .buildkite/scripts/steps/artifacts/docker_image.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/.buildkite/pipelines/emergency_release.yml b/.buildkite/pipelines/emergency_release.yml index df9b1dea3cfb7..ac359ab842a25 100644 --- a/.buildkite/pipelines/emergency_release.yml +++ b/.buildkite/pipelines/emergency_release.yml @@ -17,3 +17,4 @@ steps: env: REMOTE_SERVICE_CONFIG: "${EMERGENCY_RELEASE_REMOTE_SERVICE_CONFIG}" SERVICE_COMMIT_HASH: "${VERSION}" + DRY_RUN: "${DRY_RUN:-false}" diff --git a/.buildkite/scripts/serverless/create_deploy_tag/generate_gpctl_trigger.ts b/.buildkite/scripts/serverless/create_deploy_tag/generate_gpctl_trigger.ts index 231977979c414..445a09bceb437 100644 --- a/.buildkite/scripts/serverless/create_deploy_tag/generate_gpctl_trigger.ts +++ b/.buildkite/scripts/serverless/create_deploy_tag/generate_gpctl_trigger.ts @@ -28,6 +28,7 @@ function uploadTriggerStep(commitSha: string) { env: { SERVICE_COMMIT_HASH: commitSha.slice(0, 12), REMOTE_SERVICE_CONFIG, + ...(IS_DRY_RUN ? { DRY_RUN: 'true' } : {}), }, }, }; diff --git a/.buildkite/scripts/steps/artifacts/docker_image.sh b/.buildkite/scripts/steps/artifacts/docker_image.sh index 0706a21dd4274..1002c9f798c74 100755 --- a/.buildkite/scripts/steps/artifacts/docker_image.sh +++ b/.buildkite/scripts/steps/artifacts/docker_image.sh @@ -136,6 +136,7 @@ steps: SERVICE_COMMIT_HASH: "$GIT_ABBREV_COMMIT" SERVICE: kibana REMOTE_SERVICE_CONFIG: https://raw.githubusercontent.com/elastic/serverless-gitops/main/gen/gpctl/kibana/dev.yaml + DRY_RUN: "${DRY_RUN:-false}" EOF else