Skip to content

Commit

Permalink
Improve conditionals for x-pack/metricbeat BK CI (#39071) (#39078)
Browse files Browse the repository at this point in the history
PR#38913 had a bug for the extended tests group:
it wouldn't allow to run steps in the extended
group when not using a PR (e.g. merge commits).

This commit allows all steps in the extended
group to run when the trigger is not a PR.

(cherry picked from commit 8738b6c)

Co-authored-by: Dimitrios Liappis <[email protected]>
  • Loading branch information
mergify[bot] and dliappis authored Apr 19, 2024
1 parent f4a6455 commit 5243073
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .buildkite/x-pack/pipeline.xpack.metricbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ steps:
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*(macOS|aws).*/
steps:
- label: ":mac: MacOS x86_64 Unit Tests"
if: build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.**/
command: |
set -euo pipefail
source .buildkite/scripts/install_macos_tools.sh
Expand All @@ -197,7 +197,7 @@ steps:

- label: ":mac: MacOS arm64 Unit Tests"
skip: "https://github.com/elastic/beats/issues/33036"
if: build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.**/
command: |
set -euo pipefail
source .buildkite/scripts/install_macos_tools.sh
Expand All @@ -215,6 +215,7 @@ steps:
- label: ":linux: Cloud (MODULE) Tests"
key: "x-pack-metricbeat-extended-cloud-test"
skip: "doesn't belong in a stage in Jenkins, thus skipped"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*aws.*/
# see link in Jenkins: https://github.com/elastic/beats/blob/ccd7b135df70358f8a02393d9bd8b716428b8048/x-pack/metricbeat/Jenkinsfile.yml#L39
# additionally skipping due to https://github.com/elastic/ingest-dev/issues/3170
command: |
Expand Down Expand Up @@ -244,10 +245,10 @@ steps:

- label: ":linux: Cloud AWS (MODULE) Tests"
key: "x-pack-metricbeat-extended-cloud-test-aws"
if: build.env("GITHUB_PR_LABELS") =~ /.*aws.*/
skip: "https://github.com/elastic/beats/issues/36425"
# see commented out section in Jenkins: https://github.com/elastic/beats/blob/main/x-pack/metricbeat/Jenkinsfile.yml#L41-L52
# additionally skipping due to https://github.com/elastic/ingest-dev/issues/3170
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*aws.*/
command: |
set -euo pipefail
# defines the MODULE env var based on what's changed in a PR
Expand Down

0 comments on commit 5243073

Please sign in to comment.