diff --git a/.github/workflows/check-libbeat.yml b/.github/workflows/check-libbeat.yml new file mode 100644 index 000000000000..ec76fbefbc90 --- /dev/null +++ b/.github/workflows/check-libbeat.yml @@ -0,0 +1,29 @@ +name: check-libbeat + +on: + pull_request: + paths: + - '.github/workflows/check-packetbeat.yml' + - 'libbeat/**' + - 'x-pack/libbeat/**' + +env: + BEAT_MODULE: 'libbeat' + +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 libpcap-dev + run: sudo apt-get install -y libpcap-dev + - 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-libbeat.yml b/.github/workflows/check-xpack-libbeat.yml new file mode 100644 index 000000000000..4428b8ad9008 --- /dev/null +++ b/.github/workflows/check-xpack-libbeat.yml @@ -0,0 +1,27 @@ +name: check-x-pack-libbeat + +on: + pull_request: + paths: + - '.github/workflows/check-xpack-libbeat.yml' + - 'x-pack/libbeat/**' + - 'libbeat/**' + +env: + BEAT_MODULE: 'x-pack/libbeat' + +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 ba6b5513cb6e..029e80f3b4b5 100644 --- a/.github/workflows/opentelemetry.yml +++ b/.github/workflows/opentelemetry.yml @@ -7,6 +7,7 @@ on: - check-dev-tools - check-filebeat - check-heartbeat + - check-libbeat - check-metricbeat - check-packetbeat - check-winlogbeat @@ -14,6 +15,7 @@ on: - check-x-pack-filebeat - check-x-pack-functionbeat - check-x-pack-heartbeat + - check-x-pack-libbeat - check-x-pack-metricbeat - check-x-pack-osquerybeat - check-x-pack-packetbeat diff --git a/libbeat/Jenkinsfile.yml b/libbeat/Jenkinsfile.yml index 6219b7bdd09c..2bf7e681ae4e 100644 --- a/libbeat/Jenkinsfile.yml +++ b/libbeat/Jenkinsfile.yml @@ -12,14 +12,6 @@ when: tags: true ## for all the tags platform: "immutable && ubuntu-18" ## default label for all the stages stages: - checks: - make: | - make -C libbeat check; - make -C libbeat update; - make -C x-pack/libbeat check; - make -C x-pack/libbeat 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/libbeat/Jenkinsfile.yml b/x-pack/libbeat/Jenkinsfile.yml index 34ac4a184692..fb00273853a3 100644 --- a/x-pack/libbeat/Jenkinsfile.yml +++ b/x-pack/libbeat/Jenkinsfile.yml @@ -13,12 +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/libbeat check; - make -C x-pack/libbeat update; - make check-no-changes; - stage: checks arm: mage: "mage build unitTest" platforms: ## override default label in this specific stage.