Skip to content

Commit

Permalink
Merge branch 'main' into namespace-permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
constanca-m authored Apr 15, 2024
2 parents 227b92f + 7387eb3 commit 741a222
Show file tree
Hide file tree
Showing 273 changed files with 7,164 additions and 3,280 deletions.
280 changes: 227 additions & 53 deletions .buildkite/auditbeat/auditbeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ name: "beats-auditbeat"

env:
AWS_ARM_INSTANCE_TYPE: "m6g.xlarge"

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

GCP_DEFAULT_MACHINE_TYPE: "c2d-highcpu-8"
GCP_HI_PERF_MACHINE_TYPE: "c2d-highcpu-16"
GCP_WIN_MACHINE_TYPE: "n2-standard-8"

IMAGE_MACOS_ARM: "generic-13-ventura-arm"
IMAGE_MACOS_X86_64: "generic-13-ventura-x64"
IMAGE_RHEL9: "family/platform-ingest-beats-rhel-9"
Expand All @@ -18,60 +20,232 @@ env:
IMAGE_WIN_2019: "family/platform-ingest-beats-windows-2019"
IMAGE_WIN_2022: "family/platform-ingest-beats-windows-2022"

#Packaging
PACKAGING_ARM_PLATFORMS: "linux/arm64"
PACKAGING_PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"

#Deps
# Other deps
ASDF_MAGE_VERSION: 1.15.0

steps:
- input: "Input Parameters"
key: "run_auditbeat"
fields:
- select: "auditbeat - run_auditbeat"
key: "run_auditbeat"
options:
- label: "True"
value: "true"
- label: "False"
value: "false"
default: "false"
- select: "auditbeat - run_auditbeat_macos_tests"
key: "run_auditbeat_macos_tests"
options:
- label: "True"
value: "true"
- label: "False"
value: "false"
default: "false"
- select: "auditbeat - run_auditbeat_arm_tests"
key: "run_auditbeat_arm_tests"
options:
- label: "True"
value: "true"
- label: "False"
value: "false"
default: "false"
- select: "auditbeat - run_auditbeat_win_tests"
key: "run_auditbeat_win_tests"
options:
- label: "True"
value: "true"
- label: "False"
value: "false"
default: "false"
if: "build.source == 'ui'"
- group: "Auditbeat Mandatory Testing"
key: "auditbeat-mandatory-tests"

steps:
- label: ":ubuntu: Auditbeat Unit Tests"
command: |
cd auditbeat
mage build unitTest
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: Ubuntu Unit Tests"

- label: ":rhel: Auditbeat Unit Tests"
command: |
cd auditbeat
mage build unitTest
agents:
provider: "gcp"
image: "${IMAGE_RHEL9}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"
notify:
- github_commit_status:
context: "auditbeat: RHEL Unit Tests"

- label: ":windows: Auditbeat Win-2016 Unit Tests"
command: |
Set-Location -Path auditbeat
mage build unitTest
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"
notify:
- github_commit_status:
context: "auditbeat: Windows 2016 Unit Tests"

- label: ":windows: Auditbeat Win-2022 Unit Tests"
command: |
Set-Location -Path auditbeat
mage build unitTest
agents:
provider: "gcp"
image: "${IMAGE_WIN_2022}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 200
disk_type: "pd-ssd"
artifact_paths:
- "auditbeat/build/*.xml"
- "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"
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
notify:
- github_commit_status:
context: "auditbeat: Cross compile"

- 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"
key: "auditbeat-extended-arm64-unit-tests"
command: |
set -euo pipefail
cd auditbeat
mage unitTest
agents:
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
artifact_paths: "auditbeat/build/*.*"
notify:
- github_commit_status:
context: "metricbeat: Linux arm64 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"
command: |
set -euo pipefail
source .buildkite/scripts/install_macos_tools.sh
cd auditbeat
mage unitTest
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_X86_64}"
artifact_paths: "auditbeat/build/*.*"
notify:
- github_commit_status:
context: "auditbeat: Extended MacOS x86_64 Unit Tests"

- label: ":mac: Auditbeat macOS arm64 Unit Tests"
command: |
set -euo pipefail
source .buildkite/scripts/install_macos_tools.sh
cd auditbeat
mage unitTest
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_ARM}"
artifact_paths: "auditbeat/build/*.*"
notify:
- github_commit_status:
context: "auditbeat: Extended 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"
command: |
Set-Location -Path auditbeat
mage build unitTest
agents:
provider: "gcp"
image: "${IMAGE_WIN_2019}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths: "auditbeat/build/*.*"
notify:
- github_commit_status:
context: "auditbeat: Extended Windows 2019 Unit Tests"

- label: ":windows: Auditbeat Win-10 Unit Tests"
key: "auditbeat-extended-win-10-unit-tests"
command: |
Set-Location -Path auditbeat
mage build unitTest
agents:
provider: "gcp"
image: "${IMAGE_WIN_10}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths: "auditbeat/build/*.*"
notify:
- 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
agents:
provider: "gcp"
image: "${IMAGE_WIN_11}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths: "auditbeat/build/*.*"
notify:
- github_commit_status:
context: "auditbeat: Extended Windows 11 Unit Tests"

- wait: ~
if: "build.source == 'ui'"
allow_dependency_failure: false

- label: ":linux: Load dynamic auditbeat pipeline"
key: "auditbeat-pipeline"
command: ".buildkite/scripts/generate_auditbeat_pipeline.sh"
agents:
image: "docker.elastic.co/ci-agent-images/platform-ingest/buildkite-agent-beats-ci:latest"
notify:
- github_commit_status:
context: "${BEATS_PROJECT_NAME}: Load dynamic pipeline's steps"
# 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
# this allows building DRA artifacts even if there is flakiness in mandatory tests
if: build.env("BUILDKITE_PULL_REQUEST") != "false"
depends_on: "auditbeat-mandatory-tests"

- group: "Auditbeat Packaging"
key: "auditbeat-packaging"
steps:
- label: ":ubuntu: Auditbeat/Packaging Linux"
key: "auditbeat-package-linux-x86"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
SNAPSHOT: true
command: |
cd auditbeat
mage package
agents:
provider: gcp
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
notify:
- github_commit_status:
context: "auditbeat: Packaging Linux"

- label: ":linux: Auditbeat/Packaging Linux arm64"
key: "auditbeat-package-linux-arm64"
env:
PLATFORMS: "linux/arm64"
PACKAGES: "docker"
SNAPSHOT: true
command: |
cd auditbeat
mage package
agents:
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
notify:
- github_commit_status:
context: "auditbeat: Packaging Linux arm64"
Loading

0 comments on commit 741a222

Please sign in to comment.