Skip to content

Commit

Permalink
[7.17](backport #38736) Fix the dynamic step for pipeline upload on t…
Browse files Browse the repository at this point in the history
…he x-pack Heartbeat (#38737)

Fix unbound BEATS_PROJECT_NAME

Signed-off-by: Alexandros Sapranidis <[email protected]>
(cherry picked from commit a455d05)

Co-authored-by: Alexandros Sapranidis <[email protected]>
  • Loading branch information
mergify[bot] and alexsapran authored May 2, 2024
1 parent 9689772 commit 5cfe52f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .buildkite/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,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

0 comments on commit 5cfe52f

Please sign in to comment.