From 667811d732279f44191b8ac99ffb6e4a19aa7944 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 22 Aug 2022 17:26:40 +0100 Subject: [PATCH 1/4] action: checks for devtools --- .github/workflows/check-devtools.yml | 27 +++++++++++++++++++++++++++ .github/workflows/opentelemetry.yml | 1 + Jenkinsfile.yml | 1 - dev-tools/Jenkinsfile.yml | 17 ----------------- 4 files changed, 28 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/check-devtools.yml delete mode 100644 dev-tools/Jenkinsfile.yml diff --git a/.github/workflows/check-devtools.yml b/.github/workflows/check-devtools.yml new file mode 100644 index 00000000000..180595937a5 --- /dev/null +++ b/.github/workflows/check-devtools.yml @@ -0,0 +1,27 @@ +name: check-devtools + +on: + pull_request: + paths: + - '.github/workflows/check-devtools.yml' + - 'devtools/**' + - 'libbeat/scripts/Makefile' + +env: + BEAT_MODULE: 'devtools' + +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: Run check/update + run: | + export PATH=$PATH:$(go env GOPATH)/bin + go install github.com/magefile/mage@latest + make -C ${{ env.BEAT_MODULE }} check diff --git a/.github/workflows/opentelemetry.yml b/.github/workflows/opentelemetry.yml index 5e48b49ff8b..f3c2750b696 100644 --- a/.github/workflows/opentelemetry.yml +++ b/.github/workflows/opentelemetry.yml @@ -4,6 +4,7 @@ on: workflow_run: workflows: - check-x-pack-packetbeat + - check-devtools - check-packetbeat - golangci-lint - auditbeat diff --git a/Jenkinsfile.yml b/Jenkinsfile.yml index 8142fc2e451..811b4ae985b 100644 --- a/Jenkinsfile.yml +++ b/Jenkinsfile.yml @@ -17,7 +17,6 @@ projects: - "x-pack/osquerybeat" - "x-pack/packetbeat" - "x-pack/winlogbeat" - - "dev-tools" ## Changeset macros that are defined here and used in each specific 2.0 pipeline. changeset: diff --git a/dev-tools/Jenkinsfile.yml b/dev-tools/Jenkinsfile.yml deleted file mode 100644 index e0efd075817..00000000000 --- a/dev-tools/Jenkinsfile.yml +++ /dev/null @@ -1,17 +0,0 @@ -when: - branches: true ## for all the branches - changeset: ## when PR contains any of those entries in the changeset - - "^dev-tools/.*" - - "^libbeat/scripts/Makefile" - comments: ## when PR comment contains any of those entries - - "/test dev-tools" - labels: ## when PR labels matches any of those entries - - "dev-tools" - parameters: ## when parameter was selected in the UI. - - "dev-tools" - tags: true ## for all the tags -platform: "immutable && ubuntu-18" ## default label for all the stages -stages: - checks: - make: "make -C dev-tools check" - stage: checks From b95e2458a6f165649351772351d7e2d03aa7994a Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 22 Aug 2022 17:31:58 +0100 Subject: [PATCH 2/4] fix path --- .../workflows/{check-devtools.yml => check-dev-tools.yml} | 8 ++++---- .github/workflows/opentelemetry.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) rename .github/workflows/{check-devtools.yml => check-dev-tools.yml} (81%) diff --git a/.github/workflows/check-devtools.yml b/.github/workflows/check-dev-tools.yml similarity index 81% rename from .github/workflows/check-devtools.yml rename to .github/workflows/check-dev-tools.yml index 180595937a5..eeb5bc81fec 100644 --- a/.github/workflows/check-devtools.yml +++ b/.github/workflows/check-dev-tools.yml @@ -1,14 +1,14 @@ -name: check-devtools +name: check-dev-tools on: pull_request: paths: - - '.github/workflows/check-devtools.yml' - - 'devtools/**' + - '.github/workflows/check-dev-tools.yml' + - 'dev-tools/**' - 'libbeat/scripts/Makefile' env: - BEAT_MODULE: 'devtools' + BEAT_MODULE: 'dev-tools' jobs: check: diff --git a/.github/workflows/opentelemetry.yml b/.github/workflows/opentelemetry.yml index f3c2750b696..d7d12529a26 100644 --- a/.github/workflows/opentelemetry.yml +++ b/.github/workflows/opentelemetry.yml @@ -4,7 +4,7 @@ on: workflow_run: workflows: - check-x-pack-packetbeat - - check-devtools + - check-dev-tools - check-packetbeat - golangci-lint - auditbeat From 854d8c6a301d6d9291b351c195f556a78fe1a839 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 23 Aug 2022 09:17:31 +0100 Subject: [PATCH 3/4] action: use v3 and use go.sum for mage --- .github/workflows/check-dev-tools.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-dev-tools.yml b/.github/workflows/check-dev-tools.yml index eeb5bc81fec..7e1afe38368 100644 --- a/.github/workflows/check-dev-tools.yml +++ b/.github/workflows/check-dev-tools.yml @@ -14,14 +14,14 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Fetch Go version from .go-version run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Run check/update run: | export PATH=$PATH:$(go env GOPATH)/bin - go install github.com/magefile/mage@latest + go install github.com/magefile/mage make -C ${{ env.BEAT_MODULE }} check From 968c65785f389e57b4cfa6bb2f559db194444198 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 23 Aug 2022 14:45:32 +0100 Subject: [PATCH 4/4] Update .github/workflows/check-dev-tools.yml --- .github/workflows/check-dev-tools.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check-dev-tools.yml b/.github/workflows/check-dev-tools.yml index 7e1afe38368..df71c821a10 100644 --- a/.github/workflows/check-dev-tools.yml +++ b/.github/workflows/check-dev-tools.yml @@ -22,6 +22,5 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: Run check/update run: | - export PATH=$PATH:$(go env GOPATH)/bin go install github.com/magefile/mage make -C ${{ env.BEAT_MODULE }} check