From 184409b37b6c0cff30bbdb05dd0fbe97b35b38dc Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 25 Aug 2022 10:44:21 +0100 Subject: [PATCH 1/2] action: checks for metricbeat and x-pack/metricbeat (#32748) (cherry picked from commit 44fbc57ed35ae005851659243390934013e5e7fa) # Conflicts: # metricbeat/Jenkinsfile.yml # x-pack/metricbeat/Jenkinsfile.yml --- .github/workflows/check-metricbeat.yml | 27 ++++++++++++++++++++ .github/workflows/check-xpack-metricbeat.yml | 27 ++++++++++++++++++++ .github/workflows/opentelemetry.yml | 2 ++ metricbeat/Jenkinsfile.yml | 3 +++ x-pack/metricbeat/Jenkinsfile.yml | 3 +++ 5 files changed, 62 insertions(+) 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 b01461f8144..935e60c9252 100644 --- a/metricbeat/Jenkinsfile.yml +++ b/metricbeat/Jenkinsfile.yml @@ -13,6 +13,7 @@ when: tags: true ## for all the tags platform: "immutable && ubuntu-18" ## default label for all the stages stages: +<<<<<<< HEAD lint: make: | make -C metricbeat check; @@ -21,6 +22,8 @@ stages: make -C x-pack/metricbeat update; make check-no-changes; stage: lint +======= +>>>>>>> 44fbc57ed3 (action: checks for metricbeat and x-pack/metricbeat (#32748)) unitTest: mage: "mage build unitTest" stage: mandatory diff --git a/x-pack/metricbeat/Jenkinsfile.yml b/x-pack/metricbeat/Jenkinsfile.yml index 3c50421bb53..3e8d0851821 100644 --- a/x-pack/metricbeat/Jenkinsfile.yml +++ b/x-pack/metricbeat/Jenkinsfile.yml @@ -14,6 +14,7 @@ when: tags: true ## for all the tags platform: "immutable && ubuntu-18" ## default label for all the stages stages: +<<<<<<< HEAD lint: make: | make -C x-pack/metricbeat check; @@ -22,6 +23,8 @@ stages: make -C metricbeat update; make check-no-changes; stage: lint +======= +>>>>>>> 44fbc57ed3 (action: checks for metricbeat and x-pack/metricbeat (#32748)) unitTest: mage: "mage build unitTest" stage: mandatory From 2b86b73779a86671cefca91b61b8c6f04bd04048 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 25 Aug 2022 10:49:30 +0100 Subject: [PATCH 2/2] fix conflicts --- metricbeat/Jenkinsfile.yml | 11 ----------- x-pack/metricbeat/Jenkinsfile.yml | 11 ----------- 2 files changed, 22 deletions(-) diff --git a/metricbeat/Jenkinsfile.yml b/metricbeat/Jenkinsfile.yml index 935e60c9252..f4eabd99a5e 100644 --- a/metricbeat/Jenkinsfile.yml +++ b/metricbeat/Jenkinsfile.yml @@ -13,17 +13,6 @@ when: tags: true ## for all the tags platform: "immutable && ubuntu-18" ## default label for all the stages stages: -<<<<<<< HEAD - lint: - 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: lint -======= ->>>>>>> 44fbc57ed3 (action: checks for metricbeat and x-pack/metricbeat (#32748)) unitTest: mage: "mage build unitTest" stage: mandatory diff --git a/x-pack/metricbeat/Jenkinsfile.yml b/x-pack/metricbeat/Jenkinsfile.yml index 3e8d0851821..29d5b156f5e 100644 --- a/x-pack/metricbeat/Jenkinsfile.yml +++ b/x-pack/metricbeat/Jenkinsfile.yml @@ -14,17 +14,6 @@ when: tags: true ## for all the tags platform: "immutable && ubuntu-18" ## default label for all the stages stages: -<<<<<<< HEAD - lint: - 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: lint -======= ->>>>>>> 44fbc57ed3 (action: checks for metricbeat and x-pack/metricbeat (#32748)) unitTest: mage: "mage build unitTest" stage: mandatory