From 841671042436f881fb03e6bcf0ba238b3ae0b54a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:09:09 +0300 Subject: [PATCH] [7.17](backport #39871) Migrate github checks to buildkite for packetbeat and x-pack/packetbeat (#39875) * Migrate github checks to buildkite for packetbeat and x-pack/packetbeat (#39871) * update * update (cherry picked from commit f8679db91a544f6439ce3d4b4c8f2098abd2fcf0) # Conflicts: # .github/workflows/check-packetbeat.yml * Delete check-packetbeat.yml --------- Co-authored-by: ev1yehor <146825775+ev1yehor@users.noreply.github.com> --- .buildkite/packetbeat/pipeline.packetbeat.yml | 26 +++++++++++++++++ .../x-pack/pipeline.xpack.packetbeat.yml | 26 +++++++++++++++++ .github/workflows/check-packetbeat.yml | 29 ------------------- 3 files changed, 52 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/check-packetbeat.yml diff --git a/.buildkite/packetbeat/pipeline.packetbeat.yml b/.buildkite/packetbeat/pipeline.packetbeat.yml index a9d1b725af6..eef5fc15380 100644 --- a/.buildkite/packetbeat/pipeline.packetbeat.yml +++ b/.buildkite/packetbeat/pipeline.packetbeat.yml @@ -25,6 +25,32 @@ env: TEST_COVERAGE: "true" steps: + - group: "Packetbeat Check/Update" + key: "packetbeat-check-update" + steps: + - label: "Run check/update" + command: | + make -C packetbeat 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: "packetbeat: 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: "packetbeat-check-update" + - group: "packetbeat Mandatory Tests" key: "packetbeat-mandatory-tests" steps: diff --git a/.buildkite/x-pack/pipeline.xpack.packetbeat.yml b/.buildkite/x-pack/pipeline.xpack.packetbeat.yml index fa9a102af18..2c943a068b1 100644 --- a/.buildkite/x-pack/pipeline.xpack.packetbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.packetbeat.yml @@ -23,6 +23,32 @@ env: TEST_COVERAGE: "true" steps: + - group: "x-pack/packetbeat Check/Update" + key: "x-pack-packetbeat-check-update" + steps: + - label: "Run check/update" + command: | + make -C x-pack/packetbeat 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/packetbeat: 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-packetbeat-check-update" + - group: "x-pack/packetbeat Mandatory Tests" key: "x-pack-packetbeat-mandatory-tests" diff --git a/.github/workflows/check-packetbeat.yml b/.github/workflows/check-packetbeat.yml deleted file mode 100644 index b084e4d962e..00000000000 --- a/.github/workflows/check-packetbeat.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: check-packetbeat - -on: - pull_request: - paths: - - '.github/workflows/check-packetbeat.yml' - - 'packetbeat/**' - - 'x-pack/packetbeat/**' - -env: - BEAT_MODULE: 'packetbeat' - -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