From 18d20572de18469a2a980eba594549b0582c8cc2 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 16:14:09 +0300 Subject: [PATCH] [7.17](backport #39869) Migrate github checks to buildkite for libbeat and x-pack/libbeat (#39877) * Migrate github checks to buildkite for libbeat and x-pack/libbeat (#39869) * Update * Update pipeline.xpack.libbeat.yml * Update pipeline.xpack.libbeat.yml * update (cherry picked from commit 02a57f76489ac349d24fd2a36818559ff314a624) # Conflicts: # .buildkite/libbeat/pipeline.libbeat.yml # .github/workflows/check-libbeat.yml * Update pipeline.libbeat.yml * Delete check-libbeat.yml --------- Co-authored-by: ev1yehor <146825775+ev1yehor@users.noreply.github.com> --- .buildkite/libbeat/pipeline.libbeat.yml | 28 ++++++++++++++++++- .buildkite/x-pack/pipeline.xpack.libbeat.yml | 26 ++++++++++++++++++ .github/workflows/check-libbeat.yml | 29 -------------------- 3 files changed, 53 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/check-libbeat.yml diff --git a/.buildkite/libbeat/pipeline.libbeat.yml b/.buildkite/libbeat/pipeline.libbeat.yml index 91c93716aab..3d3247b9da9 100644 --- a/.buildkite/libbeat/pipeline.libbeat.yml +++ b/.buildkite/libbeat/pipeline.libbeat.yml @@ -17,7 +17,33 @@ env: TEST_COVERAGE: "true" steps: - - group: "Libbeat Mandatory Tests" + - group: "libbeat Check/Update" + key: "libbeat-check-update" + steps: + - label: "Run check/update" + command: | + make -C libbeat 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: "libbeat: 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: "libbeat-check-update" + + - group: "Mandatory Tests" key: "mandatory-tests" steps: diff --git a/.buildkite/x-pack/pipeline.xpack.libbeat.yml b/.buildkite/x-pack/pipeline.xpack.libbeat.yml index e48433b0e05..6cb1825b7a1 100644 --- a/.buildkite/x-pack/pipeline.xpack.libbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.libbeat.yml @@ -19,6 +19,32 @@ env: TEST_COVERAGE: "true" steps: + - group: "x-pack/libbeat Check/Update" + key: "x-pack-libbeat-check-update" + steps: + - label: "Run check/update" + command: | + make -C x-pack/libbeat 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/libbeat: 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-libbeat-check-update" + - group: "x-pack/libbeat Mandatory Tests" key: "x-pack-libbeat-mandatory-tests" diff --git a/.github/workflows/check-libbeat.yml b/.github/workflows/check-libbeat.yml deleted file mode 100644 index 38b04932a86..00000000000 --- a/.github/workflows/check-libbeat.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: check-libbeat - -on: - pull_request: - paths: - - '.github/workflows/check-packetbeat.yml' - - 'libbeat/**' - - 'x-pack/libbeat/**' - -env: - BEAT_MODULE: 'libbeat' - -jobs: - check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version-file: .go-version - - name: Update package lists - run: sudo apt-get update - - name: Install libpcap-dev - run: sudo apt-get install -y libpcap-dev - - name: Run check/update - run: | - go install github.com/magefile/mage - make -C ${{ env.BEAT_MODULE }} check update - make check-no-changes