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 9690d22d550..e12caed0ceb 100644 --- a/.github/workflows/opentelemetry.yml +++ b/.github/workflows/opentelemetry.yml @@ -3,9 +3,11 @@ name: OpenTelemetry Export Trace on: workflow_run: workflows: + - check-auditbeat - check-dev-tools - check-packetbeat - check-winlogbeat + - 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.