Skip to content

Commit

Permalink
updated step script (#37935)
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan authored Feb 9, 2024
1 parent d0519f6 commit 4fb9611
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .buildkite/auditbeat/auditbeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ steps:

steps:
- label: Package pipeline
commands: ".buildkite/auditbeat/scripts/package-step.sh | buildkite-agent pipeline upload"
commands: ".buildkite/auditbeat/scripts/package-step.sh"
4 changes: 3 additions & 1 deletion .buildkite/auditbeat/scripts/package-step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ changeset="^auditbeat/
^\.buildkite/auditbeat/"

if are_files_changed "$changeset"; then
cat <<-YAML
bk_pipeline=$(cat <<-YAML
steps:
- label: ":ubuntu: Packaging Linux X86"
key: "package-linux-x86"
Expand Down Expand Up @@ -43,6 +43,8 @@ if are_files_changed "$changeset"; then
imagePrefix: "${IMAGE_UBUNTU_ARM_64}"
instanceType: "t4g.large"
YAML
)
echo "${bk_pipeline}" | buildkite-agent pipeline upload
else
buildkite-agent annotate "No required files changed. Skipped packaging" --style 'warning' --context 'ctx-warning'
exit 0
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/filebeat/filebeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ steps:

steps:
- label: Package pipeline
commands: ".buildkite/filebeat/scripts/package-step.sh | buildkite-agent pipeline upload"
commands: ".buildkite/filebeat/scripts/package-step.sh"
4 changes: 3 additions & 1 deletion .buildkite/filebeat/scripts/package-step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ changeset="^filebeat/
^\.buildkite/filebeat/"

if are_files_changed "$changeset"; then
cat <<-YAML
bk_pipeline=$(cat <<-YAML
steps:
- label: ":ubuntu: Packaging Linux X86"
key: "package-linux-x86"
Expand Down Expand Up @@ -43,6 +43,8 @@ if are_files_changed "$changeset"; then
imagePrefix: "${IMAGE_UBUNTU_ARM_64}"
instanceType: "t4g.large"
YAML
)
echo "${bk_pipeline}" | buildkite-agent pipeline upload
else
buildkite-agent annotate "No required files changed. Skipped packaging" --style 'warning' --context 'ctx-warning'
exit 0
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/heartbeat/heartbeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ steps:

steps:
- label: Package pipeline
commands: ".buildkite/heartbeat/scripts/package-step.sh | buildkite-agent pipeline upload"
commands: ".buildkite/heartbeat/scripts/package-step.sh"
4 changes: 3 additions & 1 deletion .buildkite/heartbeat/scripts/package-step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ changeset="^heartbeat/
^\.buildkite/heartbeat/"

if are_files_changed "$changeset"; then
cat <<-YAML
bk_pipeline=$(cat <<-YAML
steps:
- label: ":ubuntu: Packaging Linux X86"
key: "package-linux-x86"
Expand Down Expand Up @@ -43,6 +43,8 @@ if are_files_changed "$changeset"; then
imagePrefix: "${IMAGE_UBUNTU_ARM_64}"
instanceType: "t4g.large"
YAML
)
echo "${bk_pipeline}" | buildkite-agent pipeline upload
else
buildkite-agent annotate "No required files changed. Skipped packaging" --style 'warning' --context 'ctx-warning'
exit 0
Expand Down

0 comments on commit 4fb9611

Please sign in to comment.