Skip to content

Commit

Permalink
Fix the dynamic step for pipeline upload on the x-pack Heartbeat (#38736
Browse files Browse the repository at this point in the history
)

Fix unbound BEATS_PROJECT_NAME

Signed-off-by: Alexandros Sapranidis <[email protected]>
  • Loading branch information
alexsapran authored Apr 5, 2024
1 parent dbdaac3 commit a455d05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .buildkite/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ case "${BUILDKITE_PIPELINE_SLUG}" in
esac

check_and_set_beat_vars() {
if [[ -n "$BEATS_PROJECT_NAME" && "$BEATS_PROJECT_NAME" == *"x-pack/"* ]]; then
local BEATS_PROJECT_NAME=${BEATS_PROJECT_NAME:=""}
if [[ "${BEATS_PROJECT_NAME:=""}" == *"x-pack/"* ]]; then
BEATS_XPACK_PROJECT_NAME=${BEATS_PROJECT_NAME//-/} #remove -
BEATS_XPACK_PROJECT_NAME=${BEATS_XPACK_PROJECT_NAME//\//_} #replace / to _
BEATS_XPACK_LABEL_PROJECT_NAME=${BEATS_PROJECT_NAME//\//-} #replace / to - for labels
Expand Down
1 change: 0 additions & 1 deletion .buildkite/x-pack/pipeline.xpack.heartbeat.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
name: "beats-xpack-heartbeat"


env:
AWS_ARM_INSTANCE_TYPE: "t4g.xlarge"
BEATS_PROJECT_NAME: "x-pack/heartbeat"
Expand Down

0 comments on commit a455d05

Please sign in to comment.