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