From e214cf4c2f2d8c79165b0b23a62a076f344ee760 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 23:47:12 +0300 Subject: [PATCH] [7.17](backport #39751) Migrate github check for Filebeat and x-pack/filebeat to Buildkite pipeline (#39866) * Migrate github check for Filebeat and x-pack/filebeat to Buildkite pipeline (#39751) * Update filebeat-pipeline.yml * Update filebeat-pipeline.yml * Update filebeat-pipeline.yml * Update filebeat-pipeline.yml * Update filebeat-pipeline.yml * Update filebeat-pipeline.yml * Update filebeat-pipeline.yml * Update filebeat-pipeline.yml * Update filebeat-pipeline.yml * Update filebeat-pipeline.yml * Update filebeat-pipeline.yml * Migrate check * Update filebeat-pipeline.yml * Update pipeline.xpack.filebeat.yml * Update pipeline.xpack.filebeat.yml * Update pipeline.xpack.filebeat.yml * Update (cherry picked from commit bb898001f52042c72ab87651096cb63bee9a9e58) # Conflicts: # .github/workflows/check-filebeat.yml * Delete check-filebeat.yml --------- Co-authored-by: ev1yehor <146825775+ev1yehor@users.noreply.github.com> --- .buildkite/filebeat/filebeat-pipeline.yml | 26 +++++++++++++++++ .buildkite/x-pack/pipeline.xpack.filebeat.yml | 27 +++++++++++++++++ .github/workflows/check-filebeat.yml | 29 ------------------- 3 files changed, 53 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/check-filebeat.yml diff --git a/.buildkite/filebeat/filebeat-pipeline.yml b/.buildkite/filebeat/filebeat-pipeline.yml index 52e9a1d087c..cf1f07175bf 100644 --- a/.buildkite/filebeat/filebeat-pipeline.yml +++ b/.buildkite/filebeat/filebeat-pipeline.yml @@ -24,6 +24,32 @@ env: TEST_COVERAGE: "true" steps: + - group: "Filebeat Check/Update" + key: "filebeat-check-update" + steps: + - label: "Run check/update" + command: | + make -C filebeat 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:0.3" + cpu: "4000m" + memory: "8Gi" + useCustomGlobalHooks: true + notify: + - github_commit_status: + context: "filebeat: 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: "filebeat-check-update" + - group: "Filebeat Mandatory Tests" key: "filebeat-mandatory-tests" steps: diff --git a/.buildkite/x-pack/pipeline.xpack.filebeat.yml b/.buildkite/x-pack/pipeline.xpack.filebeat.yml index 33350aee200..c0b8bc048b3 100644 --- a/.buildkite/x-pack/pipeline.xpack.filebeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.filebeat.yml @@ -24,6 +24,33 @@ env: TEST_COVERAGE: "true" steps: + - group: "x-pack/filebeat Check/Update" + key: "x-pack-filebeat-check-update" + steps: + - label: "Run check/update" + command: | + make -C x-pack/filebeat 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:0.3" + cpu: "4000m" + memory: "8Gi" + useCustomGlobalHooks: true + notify: + - github_commit_status: + context: "x-pack-filebeat: 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-filebeat-check-update" + + - group: "x-pack/filebeat Mandatory Tests" key: "x-pack-filebeat-mandatory-tests" diff --git a/.github/workflows/check-filebeat.yml b/.github/workflows/check-filebeat.yml deleted file mode 100644 index 0c08232e8af..00000000000 --- a/.github/workflows/check-filebeat.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: check-filebeat - -on: - pull_request: - paths: - - '.github/workflows/check-filebeat.yml' - - 'filebeat/**' - - 'x-pack/filebeat/**' - -env: - BEAT_MODULE: 'filebeat' - -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 libsystemd-dev - run: sudo apt-get install -y libsystemd-dev - - name: Run check/update - run: | - go install github.com/magefile/mage - make -C ${{ env.BEAT_MODULE }} check update - make check-no-changes