diff --git a/.buildkite/heartbeat/heartbeat-pipeline.yml b/.buildkite/heartbeat/heartbeat-pipeline.yml index b0bd67b036a..5d5d3c35433 100644 --- a/.buildkite/heartbeat/heartbeat-pipeline.yml +++ b/.buildkite/heartbeat/heartbeat-pipeline.yml @@ -26,6 +26,33 @@ env: TEST_COVERAGE: "true" steps: + - group: "Heartbeat Check/Update" + key: "heartbeat-check-update" + + steps: + - label: "Run check/update" + command: | + make -C heartbeat 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: "hearbeat: 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: "heartbeat-check-update" + - group: "Heartbeat Mandatory Testing" key: "heartbeat-mandatory-tests" diff --git a/.buildkite/x-pack/pipeline.xpack.heartbeat.yml b/.buildkite/x-pack/pipeline.xpack.heartbeat.yml index 959caebebcc..d8bda333c0b 100644 --- a/.buildkite/x-pack/pipeline.xpack.heartbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.heartbeat.yml @@ -31,6 +31,33 @@ env: TEST_COVERAGE: "true" steps: + - group: "x-pack/heartbeat Check/Update" + key: "x-pack-heartbeat-check-update" + + steps: + - label: "Run check/update" + command: | + make -C x-pack/heartbeat 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/heartbeat: 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-heartbeat-check-update" + - group: "x-pack/heartbeat Mandatory Tests" key: "x-pack-heartbeat-mandatory-tests" steps: diff --git a/.github/workflows/check-xpack-heartbeat.yml b/.github/workflows/check-xpack-heartbeat.yml deleted file mode 100644 index c9b77cbebb3..00000000000 --- a/.github/workflows/check-xpack-heartbeat.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: check-x-pack-heartbeat - -on: - pull_request: - paths: - - '.github/workflows/check-xpack-heartbeat.yml' - - 'x-pack/heartbeat/**' - - 'heartbeat/**' - -env: - BEAT_MODULE: 'x-pack/heartbeat' - -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