From 4a07748ba162f163fa4723ada2b961ec8625052f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 25 Aug 2022 10:40:54 +0100 Subject: [PATCH] [8.4](backport #32745) action: checks for auditbeat and x-pack/auditbeat (#32813) --- .github/workflows/check-audtibeat.yml | 27 +++++++++++++++++++ .github/workflows/check-xpack-auditbeat.yml | 29 +++++++++++++++++++++ .github/workflows/opentelemetry.yml | 2 ++ auditbeat/Jenkinsfile.yml | 8 ------ x-pack/auditbeat/Jenkinsfile.yml | 8 ------ 5 files changed, 58 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/check-audtibeat.yml create mode 100644 .github/workflows/check-xpack-auditbeat.yml diff --git a/.github/workflows/check-audtibeat.yml b/.github/workflows/check-audtibeat.yml new file mode 100644 index 00000000000..20e8459d557 --- /dev/null +++ b/.github/workflows/check-audtibeat.yml @@ -0,0 +1,27 @@ +name: check-auditbeat + +on: + pull_request: + paths: + - '.github/workflows/check-auditbeat.yml' + - 'auditbeat/**' + - 'x-pack/auditbeat/**' + +env: + BEAT_MODULE: 'auditbeat' + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Fetch Go version from .go-version + run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV + - uses: actions/setup-go@v3 + with: + go-version: ${{ env.GO_VERSION }} + - name: Run check/update + run: | + go install github.com/magefile/mage + make -C ${{ env.BEAT_MODULE }} check update + make check-no-changes diff --git a/.github/workflows/check-xpack-auditbeat.yml b/.github/workflows/check-xpack-auditbeat.yml new file mode 100644 index 00000000000..1902de3942e --- /dev/null +++ b/.github/workflows/check-xpack-auditbeat.yml @@ -0,0 +1,29 @@ +name: check-x-pack-auditbeat + +on: + pull_request: + paths: + - '.github/workflows/check-xpack-auditbeat.yml' + - 'x-pack/auditbeat/**' + - 'auditbeat/**' + +env: + BEAT_MODULE: 'x-pack/auditbeat' + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Fetch Go version from .go-version + run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV + - uses: actions/setup-go@v3 + with: + go-version: ${{ env.GO_VERSION }} + - name: Install librpm-dev + run: sudo apt-get install -y librpm-dev + - name: Run check/update + uses: magefile/mage-action@v2 + with: + args: check update + workdir: "${{ env.BEAT_MODULE }}" diff --git a/.github/workflows/opentelemetry.yml b/.github/workflows/opentelemetry.yml index 2dc999c1a89..22e524da1dc 100644 --- a/.github/workflows/opentelemetry.yml +++ b/.github/workflows/opentelemetry.yml @@ -3,8 +3,10 @@ name: OpenTelemetry Export Trace on: workflow_run: workflows: + - check-auditbeat - check-dev-tools - check-packetbeat + - check-x-pack-auditbeat - check-x-pack-functionbeat - check-x-pack-osquerybeat - check-x-pack-packetbeat diff --git a/auditbeat/Jenkinsfile.yml b/auditbeat/Jenkinsfile.yml index 463594ef7e0..667cd64f574 100644 --- a/auditbeat/Jenkinsfile.yml +++ b/auditbeat/Jenkinsfile.yml @@ -13,14 +13,6 @@ when: tags: true ## for all the tags platform: "immutable && ubuntu-18" ## default label for all the stages stages: - checks: - make: | - make -C auditbeat check; - make -C auditbeat update; - make -C x-pack/auditbeat check; - make -C x-pack/auditbeat update; - make check-no-changes; - stage: checks arm: mage: "mage build unitTest" platforms: ## override default label in this specific stage. diff --git a/x-pack/auditbeat/Jenkinsfile.yml b/x-pack/auditbeat/Jenkinsfile.yml index dc86c9ead19..01d2a0298d3 100644 --- a/x-pack/auditbeat/Jenkinsfile.yml +++ b/x-pack/auditbeat/Jenkinsfile.yml @@ -13,14 +13,6 @@ when: tags: true ## for all the tags platform: "immutable && ubuntu-18" ## default label for all the stages stages: - checks: - make: | - make -C x-pack/auditbeat check; - make -C x-pack/auditbeat update; - make -C auditbeat check; - make -C auditbeat update; - make check-no-changes; - stage: checks arm: mage: "mage build unitTest" platforms: ## override default label in this specific stage.