Skip to content

Commit

Permalink
actions: run check for x-pack/packetbeat and packebeat (#32711)
Browse files Browse the repository at this point in the history
(cherry picked from commit 54b6f15)

# Conflicts:
#	packetbeat/Jenkinsfile.yml
#	x-pack/packetbeat/Jenkinsfile.yml
  • Loading branch information
v1v authored and mergify[bot] committed Aug 22, 2022
1 parent 9519886 commit b6ae598
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/check-packetbeat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: check-packetbeat

on:
pull_request:
paths:
- '.github/workflows/check-packetbeat.yml'
- 'packetbeat/**'
- 'x-pack/packetbeat/**'

env:
BEAT_MODULE: 'packetbeat'

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch Go version from .go-version
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Install libpcap-dev
run: sudo apt-get install -y libpcap-dev
- name: Run check/update
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go install github.com/magefile/mage@latest
make -C ${{ env.BEAT_MODULE }} check update
make check-no-changes
29 changes: 29 additions & 0 deletions .github/workflows/check-xpack-packetbeat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: check-x-pack-packetbeat

on:
pull_request:
paths:
- '.github/workflows/check-xpack-packetbeat.yml'
- 'x-pack/packetbeat/**'
- 'packetbeat/**'

env:
BEAT_MODULE: 'x-pack/packetbeat'

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch Go version from .go-version
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Install libpcap-dev
run: sudo apt-get install -y libpcap-dev
- name: Run check/update
uses: magefile/mage-action@v2
with:
args: check update
workdir: "${{ env.BEAT_MODULE }}"
2 changes: 2 additions & 0 deletions .github/workflows/opentelemetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: OpenTelemetry Export Trace
on:
workflow_run:
workflows:
- check-x-pack-packetbeat
- check-packetbeat
- golangci-lint
- auditbeat
- filebeat
Expand Down
3 changes: 3 additions & 0 deletions packetbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 packetbeat check;
Expand All @@ -22,6 +23,8 @@ stages:
mage check;
mage update;
stage: lint
=======
>>>>>>> 54b6f15ef4 (actions: run check for x-pack/packetbeat and packebeat (#32711))
arm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
Expand Down
3 changes: 3 additions & 0 deletions x-pack/packetbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ when:
tags: true ## for all the tags
platform: "immutable && ubuntu-18" ## default label for all the stages
stages:
<<<<<<< HEAD
lint:
mage: |
mage check;
Expand All @@ -22,6 +23,8 @@ stages:
make -C packetbeat update;
make check-no-changes;
stage: lint
=======
>>>>>>> 54b6f15ef4 (actions: run check for x-pack/packetbeat and packebeat (#32711))
arm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
Expand Down

0 comments on commit b6ae598

Please sign in to comment.