Skip to content

Commit

Permalink
updated auditbeat
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed Apr 27, 2024
1 parent 81f6310 commit 23fd2a0
Showing 1 changed file with 83 additions and 30 deletions.
113 changes: 83 additions & 30 deletions .buildkite/auditbeat/auditbeat-pipeline.yml
Expand Up @@ -3,7 +3,6 @@ name: "beats-auditbeat"

env:
AWS_ARM_INSTANCE_TYPE: "m6g.xlarge"

AWS_IMAGE_UBUNTU_ARM_64: "platform-ingest-beats-ubuntu-2204-aarch64"

GCP_DEFAULT_MACHINE_TYPE: "c2d-highcpu-8"
Expand All @@ -24,12 +23,13 @@ env:
ASDF_MAGE_VERSION: 1.15.0

steps:
- group: "Auditbeat Mandatory Testing"
- group: "Auditbeat Mandatory Testing "
key: "auditbeat-mandatory-tests"

steps:
- label: ":ubuntu: Auditbeat Unit Tests"
command: |
set -euo pipefail
cd auditbeat
mage build unitTest
agents:
Expand All @@ -45,6 +45,7 @@ steps:

- label: ":rhel: Auditbeat Unit Tests"
command: |
set -euo pipefail
cd auditbeat
mage build unitTest
agents:
Expand Down Expand Up @@ -73,7 +74,7 @@ steps:
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: Windows 2016 Unit Tests"
context: "auditbeat: Win-2016 Unit Tests"

- label: ":windows: Auditbeat Win-2022 Unit Tests"
command: |
Expand All @@ -90,10 +91,11 @@ steps:
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: Windows 2022 Unit Tests"
context: "auditbeat: Win-2022 Unit Tests"

- label: ":linux: Auditbeat Crosscompile"
command: |
set -euo pipefail
make -C auditbeat crosscompile
env:
GOX_FLAGS: "-arch amd64"
Expand All @@ -103,61 +105,104 @@ steps:
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
notify:
- github_commit_status:
context: "auditbeat: Cross compile"
context: "auditbeat: Crosscompile"

- group: "Auditbeat Extended Tests"
key: "auditbeat-extended-tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false"

- group: "Auditbeat Linux arm64 Tests"
key: "auditbeat-extended-tests-linux-arm64"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*arm.*/
steps:
- label: ":linux: Auditbeat Linux arm64 Unit Tests"
- label: ":linux: Auditbeat Ubuntu Integration Tests"
key: "auditbeat-extended-integ-tests"
command: |
set -euo pipefail
cd auditbeat
mage build integTest
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 Linux ARM Integration Tests"
key: "auditbeat-extended-arm64-integ-tests"
if: build.env("GITHUB_PR_LABELS") =~ /.*arm.*/
command: |
set -euo pipefail
cd auditbeat
mage build integTest
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 ARM Integration Tests"

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

- group: "Auditbeat MacOS Extended"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/
steps:
- label: ":mac: Auditbeat macOS x86_64 Unit Tests"
- label: ":mac: Auditbeat MacOS Unit Tests"
if: build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/
command: |
set -euo pipefail
source .buildkite/scripts/install_macos_tools.sh
cd auditbeat
mage unitTest
mage build unitTest
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_X86_64}"
artifact_paths: "auditbeat/build/*.*"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: Extended MacOS x86_64 Unit Tests"
context: "auditbeat: MacOS Unit Tests"

- label: ":mac: Auditbeat macOS arm64 Unit Tests"
- label: ":mac: Auditbeat macOS ARM Unit Tests"
if: build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/
command: |
set -euo pipefail
source .buildkite/scripts/install_macos_tools.sh
cd auditbeat
mage unitTest
mage build unitTest
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_ARM}"
artifact_paths: "auditbeat/build/*.*"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: Extended MacOS arm64 Unit Tests"
context: "auditbeat: MacOS ARM 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"
Expand All @@ -170,10 +215,12 @@ steps:
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths: "auditbeat/build/*.*"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: Extended Windows 2019 Unit Tests"
context: "auditbeat: Extended Win-2019 Unit Tests"

- label: ":windows: Auditbeat Win-10 Unit Tests"
key: "auditbeat-extended-win-10-unit-tests"
Expand All @@ -186,12 +233,14 @@ steps:
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths: "auditbeat/build/*.*"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: Extended Windows 10 Unit Tests"
context: "auditbeat: Extended Win-10 Unit Tests"

- label: ":windows: Auditbeat Win-11 Unit Tests"
- label: ":windows: Auditbeat Win 11 Unit Tests"
key: "auditbeat-extended-win-11-unit-tests"
command: |
Set-Location -Path auditbeat
Expand All @@ -202,10 +251,12 @@ steps:
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths: "auditbeat/build/*.*"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: Extended Windows 11 Unit Tests"
context: "auditbeat: Extended Win 11 Unit Tests"

- wait: ~
# with PRs, we want to run packaging only if mandatory tests succeed
Expand All @@ -223,6 +274,7 @@ steps:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
SNAPSHOT: true
command: |
set -euo pipefail
cd auditbeat
mage package
agents:
Expand All @@ -240,6 +292,7 @@ steps:
PACKAGES: "docker"
SNAPSHOT: true
command: |
set -euo pipefail
cd auditbeat
mage package
agents:
Expand Down

0 comments on commit 23fd2a0

Please sign in to comment.