From 44fbc57ed35ae005851659243390934013e5e7fa Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 25 Aug 2022 10:44:21 +0100 Subject: [PATCH] action: checks for metricbeat and x-pack/metricbeat (#32748) --- .github/workflows/check-metricbeat.yml | 27 ++++++++++++++++++++ .github/workflows/check-xpack-metricbeat.yml | 27 ++++++++++++++++++++ .github/workflows/opentelemetry.yml | 2 ++ metricbeat/Jenkinsfile.yml | 8 ------ x-pack/metricbeat/Jenkinsfile.yml | 8 ------ 5 files changed, 56 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/check-metricbeat.yml create mode 100644 .github/workflows/check-xpack-metricbeat.yml diff --git a/.github/workflows/check-metricbeat.yml b/.github/workflows/check-metricbeat.yml new file mode 100644 index 00000000000..54f4753531d --- /dev/null +++ b/.github/workflows/check-metricbeat.yml @@ -0,0 +1,27 @@ +name: check-metricbeat + +on: + pull_request: + paths: + - '.github/workflows/check-metricbeat.yml' + - 'metricbeat/**' + - 'x-pack/metricbeat/**' + +env: + BEAT_MODULE: 'metricbeat' + +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-metricbeat.yml b/.github/workflows/check-xpack-metricbeat.yml new file mode 100644 index 00000000000..e3bd576c386 --- /dev/null +++ b/.github/workflows/check-xpack-metricbeat.yml @@ -0,0 +1,27 @@ +name: check-x-pack-metricbeat + +on: + pull_request: + paths: + - '.github/workflows/check-xpack-metricbeat.yml' + - 'x-pack/metricbeat/**' + - 'metricbeat/**' + +env: + BEAT_MODULE: 'x-pack/metricbeat' + +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/opentelemetry.yml b/.github/workflows/opentelemetry.yml index cd407bef432..41f5acccd0f 100644 --- a/.github/workflows/opentelemetry.yml +++ b/.github/workflows/opentelemetry.yml @@ -6,11 +6,13 @@ on: - check-auditbeat - check-dev-tools - check-filebeat + - check-metricbeat - check-packetbeat - check-winlogbeat - check-x-pack-auditbeat - check-x-pack-filebeat - check-x-pack-functionbeat + - check-x-pack-metricbeat - check-x-pack-osquerybeat - check-x-pack-packetbeat - check-x-pack-winlogbeat diff --git a/metricbeat/Jenkinsfile.yml b/metricbeat/Jenkinsfile.yml index 8832fe259fc..29736ea8c42 100644 --- a/metricbeat/Jenkinsfile.yml +++ b/metricbeat/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 metricbeat check; - make -C metricbeat update; - make -C x-pack/metricbeat check; - make -C x-pack/metricbeat update; - make check-no-changes; - stage: checks unitTest: mage: "mage build unitTest" stage: mandatory diff --git a/x-pack/metricbeat/Jenkinsfile.yml b/x-pack/metricbeat/Jenkinsfile.yml index fd3e5fb347b..a61132526c8 100644 --- a/x-pack/metricbeat/Jenkinsfile.yml +++ b/x-pack/metricbeat/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/metricbeat check; - make -C x-pack/metricbeat update; - make -C metricbeat check; - make -C metricbeat update; - make check-no-changes; - stage: checks unitTest: mage: "mage build unitTest" stage: mandatory