From bb898001f52042c72ab87651096cb63bee9a9e58 Mon Sep 17 00:00:00 2001 From: ev1yehor <146825775+ev1yehor@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:21:39 +0300 Subject: [PATCH] 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 --- .buildkite/filebeat/filebeat-pipeline.yml | 26 +++++++++++++++ .buildkite/x-pack/pipeline.xpack.filebeat.yml | 27 ++++++++++++++++ .github/workflows/check-filebeat.yml | 32 ------------------- 3 files changed, 53 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/check-filebeat.yml diff --git a/.buildkite/filebeat/filebeat-pipeline.yml b/.buildkite/filebeat/filebeat-pipeline.yml index 87f1925a372..849720d1e2d 100644 --- a/.buildkite/filebeat/filebeat-pipeline.yml +++ b/.buildkite/filebeat/filebeat-pipeline.yml @@ -27,6 +27,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 1aa1c51ca5f..ce45e798239 100644 --- a/.buildkite/x-pack/pipeline.xpack.filebeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.filebeat.yml @@ -26,6 +26,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" steps: diff --git a/.github/workflows/check-filebeat.yml b/.github/workflows/check-filebeat.yml deleted file mode 100644 index 930a04ec5e5..00000000000 --- a/.github/workflows/check-filebeat.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: check-filebeat - -on: - pull_request: - paths: - - '.github/workflows/check-filebeat.yml' - - 'filebeat/**' - - 'x-pack/filebeat/**' - -env: - BEAT_MODULE: 'filebeat' - -permissions: - contents: read - -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