Skip to content

Commit

Permalink
Auditbeat: align Buildkite steps to match Jenkins (#39568)
Browse files Browse the repository at this point in the history
Updated auditbeat pipeline to match same steps & commands as in Jenkins on 7.17 branch and removed dynamic pipeline generation script
  • Loading branch information
oakrizan committed May 15, 2024
1 parent 9f5bd5a commit a52cafc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 367 deletions.
175 changes: 24 additions & 151 deletions .buildkite/auditbeat/auditbeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,43 +31,42 @@ steps:
key: "auditbeat-mandatory-tests"

steps:
- label: ":ubuntu: Auditbeat Unit Tests"
- label: ":linux: Auditbeat Ubuntu arm64 Unit Tests"
key: "auditbeat-extended-arm64-unit-tests"
command: |
set -euo pipefail
cd auditbeat
mage build unitTest
retry:
automatic:
- limit: 3
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: Ubuntu Unit Tests"
context: "auditbeat: Linux arm64 Unit Tests"

- label: ":rhel: Auditbeat Unit Tests"
- label: ":ubuntu: Auditbeat Unit Tests"
command: |
set -euo pipefail
cd auditbeat
mage build unitTest
retry:
automatic:
- limit: 3
agents:
provider: "gcp"
image: "${IMAGE_RHEL9}"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: RHEL Unit Tests"
context: "auditbeat: Ubuntu Unit Tests"

- label: "Module compat tests: next major"
# Run module integration tests under next major of Elastic stack.
Expand All @@ -94,36 +93,32 @@ steps:
- github_commit_status:
context: "auditbeat: Module compat tests / next major"

- label: ":windows: Auditbeat Win-2016 Unit Tests"
- label: ":linux: Auditbeat Crosscompile"
command: |
Set-Location -Path auditbeat
mage build unitTest
make -C auditbeat crosscompile
env:
GOX_FLAGS: "-arch amd64"
retry:
automatic:
- limit: 3
- limit: 3
agents:
provider: "gcp"
image: "${IMAGE_WIN_2016}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 200
disk_type: "pd-ssd"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
notify:
- github_commit_status:
context: "auditbeat: Windows 2016 Unit Tests"
context: "auditbeat: Crosscompile"

- label: ":windows: Auditbeat Win-2022 Unit Tests"
- label: ":windows: Auditbeat Win-2019 Unit Tests"
command: |
Set-Location -Path auditbeat
mage build unitTest
retry:
automatic:
- limit: 3
- limit: 3
agents:
provider: "gcp"
image: "${IMAGE_WIN_2022}"
image: "${IMAGE_WIN_2019}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 200
disk_type: "pd-ssd"
Expand All @@ -132,92 +127,13 @@ steps:
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: Windows 2022 Unit Tests"

- label: ":linux: Auditbeat Crosscompile"
command: |
make -C auditbeat crosscompile
env:
GOX_FLAGS: "-arch amd64"
retry:
automatic:
- limit: 3
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
notify:
- github_commit_status:
context: "auditbeat: Crosscompile"
context: "auditbeat: Windows 2019 Unit Tests"

- group: "Auditbeat Extended Tests"
key: "auditbeat-extended-tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*(macOS|arm|integrations).*/

steps:
- label: ":linux: Auditbeat Ubuntu Integration Tests"
key: "auditbeat-extended-integ-tests"
if: build.env("GITHUB_PR_LABELS") =~ /.*integrations.*/
command: |
set -euo pipefail
cd auditbeat
mage build integTest
retry:
automatic:
- limit: 3
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: Linux Integration Tests"

- label: ":linux: Auditbeat Ubuntu arm64 Integration Tests"
key: "auditbeat-extended-arm64-integ-tests"
if: build.env("GITHUB_PR_LABELS") =~ /.*integrations.*/
command: |
set -euo pipefail
cd auditbeat
mage build integTest
retry:
automatic:
- limit: 3
agents:
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: Linux arm64 Integration Tests"

- label: ":linux: Auditbeat Ubuntu arm64 Unit Tests"
key: "auditbeat-extended-arm64-unit-tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*arm.*/
command: |
set -euo pipefail
cd auditbeat
mage build unitTest
retry:
automatic:
- limit: 3
agents:
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: Linux arm64 Unit Tests"

- label: ":mac: Auditbeat macOS x86_64 Unit Tests"
if: build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/
command: |
Expand All @@ -238,33 +154,13 @@ steps:
- github_commit_status:
context: "auditbeat: macOS x86_64 Unit Tests"

- label: ":mac: Auditbeat macOS arm64 ARM Unit Tests"
if: build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/
command: |
set -euo pipefail
source .buildkite/scripts/install_macos_tools.sh
cd auditbeat
mage build unitTest
retry:
automatic:
- limit: 3
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_ARM}"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: macOS arm64 Unit Tests"

- group: "Auditbeat Windows Extended Testing"
key: "auditbeat-extended-tests-win"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*[Ww]indows.*/

steps:
- label: ":windows: Auditbeat Win-2019 Unit Tests"
key: "auditbeat-extended-win-2019-unit-tests"
- label: ":windows: Auditbeat Win-2016 Unit Tests"
key: "auditbeat-extended-win-2016-unit-tests"
command: |
Set-Location -Path auditbeat
mage build unitTest
Expand All @@ -273,7 +169,7 @@ steps:
- limit: 3
agents:
provider: "gcp"
image: "${IMAGE_WIN_2019}"
image: "${IMAGE_WIN_2016}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
Expand Down Expand Up @@ -305,27 +201,6 @@ steps:
- github_commit_status:
context: "auditbeat: Extended Windows 10 Unit Tests"

- label: ":windows: Auditbeat Win-11 Unit Tests"
key: "auditbeat-extended-win-11-unit-tests"
command: |
Set-Location -Path auditbeat
mage build unitTest
retry:
automatic:
- limit: 3
agents:
provider: "gcp"
image: "${IMAGE_WIN_11}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: Extended Windows 11 Unit Tests"

- wait: ~
# with PRs, we want to run packaging only if mandatory tests succeed
# for other cases, e.g. merge commits, we want to run packaging (and publish) independently of other tests
Expand All @@ -342,7 +217,6 @@ steps:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64"
SNAPSHOT: true
command: |
set -euo pipefail
cd auditbeat
mage package
retry:
Expand All @@ -364,7 +238,6 @@ steps:
PACKAGES: "docker"
SNAPSHOT: true
command: |
set -euo pipefail
cd auditbeat
mage package
retry:
Expand Down
Loading

0 comments on commit a52cafc

Please sign in to comment.