[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.
This commit is contained in:
Alex Szabo 2024-03-14 10:45:27 +01:00 committed by GitHub
parent a2b100c2b8
commit 52ff9b08c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 0 deletions

View file

@ -17,3 +17,4 @@ steps:
env:
REMOTE_SERVICE_CONFIG: "${EMERGENCY_RELEASE_REMOTE_SERVICE_CONFIG}"
SERVICE_COMMIT_HASH: "${VERSION}"
DRY_RUN: "${DRY_RUN:-false}"

View file

@ -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' } : {}),
},
},
};

View file

@ -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