From 429cebaf6730fbade7b07398cddb861e883ad1a8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 15:38:06 +0300 Subject: [PATCH] [7.17](backport #39870) Migrate github checks to buildkite for metricbeat and x-pack/metricbeat (#39941) * Migrate github checks to buildkite for metricbeat and x-pack/metricbeat (#39870) * Update * Update pipeline.xpack.metricbeat.yml * Update version of image (cherry picked from commit 9e7099337559076dcaeda2193e793ad557c80dfd) # Conflicts: # .github/workflows/check-metricbeat.yml * Delete check-metricbeat.yml --------- Co-authored-by: ev1yehor <146825775+ev1yehor@users.noreply.github.com> --- .buildkite/metricbeat/pipeline.yml | 26 +++++++++++++++++++ .../x-pack/pipeline.xpack.metricbeat.yml | 26 +++++++++++++++++++ .github/workflows/check-metricbeat.yml | 25 ------------------ 3 files changed, 52 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/check-metricbeat.yml diff --git a/.buildkite/metricbeat/pipeline.yml b/.buildkite/metricbeat/pipeline.yml index ab243443822..1b59e5140d3 100644 --- a/.buildkite/metricbeat/pipeline.yml +++ b/.buildkite/metricbeat/pipeline.yml @@ -28,6 +28,32 @@ env: TEST_COVERAGE: "true" steps: + - group: "Metricbeat Check/Update" + key: "metricbeat-check-update" + steps: + - label: "Run check/update" + command: | + make -C metricbeat check update + make check-no-changes + retry: + automatic: + - limit: 3 + agents: + image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:latest" + cpu: "4000m" + memory: "8Gi" + useCustomGlobalHooks: true + notify: + - github_commit_status: + context: "metricbeat: check/update" + + - wait: ~ + # with PRs, we want to run mandatory tests only if check/update step succeed + # for other cases, e.g. merge commits, we want to run mundatory test (and publish) independently of other tests + # this allows building DRA artifacts even if there is flakiness in check/update step + if: build.env("BUILDKITE_PULL_REQUEST") != "false" + depends_on: "metricbeat-check-update" + - group: "Metricbeat Mandatory Tests" key: "metricbeat-mandatory-tests" steps: diff --git a/.buildkite/x-pack/pipeline.xpack.metricbeat.yml b/.buildkite/x-pack/pipeline.xpack.metricbeat.yml index a68ba388b43..7ab0e851ffc 100644 --- a/.buildkite/x-pack/pipeline.xpack.metricbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.metricbeat.yml @@ -26,6 +26,32 @@ env: TEST_COVERAGE: "true" steps: + - group: "x-pack/metricbeat Check/Update" + key: "x-pack-metricbeat-check-update" + steps: + - label: "Run check/update" + command: | + make -C x-pack/metricbeat check update + make check-no-changes + retry: + automatic: + - limit: 3 + agents: + image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci-with-hooks:latest" + cpu: "4000m" + memory: "8Gi" + useCustomGlobalHooks: true + notify: + - github_commit_status: + context: "x-pack/metricbeat: check/update" + + - wait: ~ + # with PRs, we want to run mandatory tests only if check/update step succeed + # for other cases, e.g. merge commits, we want to run mundatory test (and publish) independently of other tests + # this allows building DRA artifacts even if there is flakiness in check/update step + if: build.env("BUILDKITE_PULL_REQUEST") != "false" + depends_on: "x-pack-metricbeat-check-update" + - group: "x-pack/metricbeat Mandatory Tests" key: "x-pack-metricbeat-mandatory-tests" steps: diff --git a/.github/workflows/check-metricbeat.yml b/.github/workflows/check-metricbeat.yml deleted file mode 100644 index 452f0dbedc1..00000000000 --- a/.github/workflows/check-metricbeat.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: check-metricbeat - -on: - pull_request: - paths: - - '.github/workflows/check-metricbeat.yml' - - 'metricbeat/**' - - 'x-pack/metricbeat/**' - -env: - BEAT_MODULE: 'metricbeat' - -jobs: - check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version-file: .go-version - - name: Run check/update - run: | - go install github.com/magefile/mage - make -C ${{ env.BEAT_MODULE }} check update - make check-no-changes