Skip to content

Commit

Permalink
Single pipeline entrypoint (#38783)
Browse files Browse the repository at this point in the history
* Single pipeline entrypoint

* Fix indentations

* Notifications

(cherry picked from commit d0a3b45)

# Conflicts:
#	.buildkite/auditbeat/auditbeat-pipeline.yml
#	.buildkite/heartbeat/heartbeat-pipeline.yml
#	.buildkite/pipeline.yml
#	.buildkite/scripts/common.sh
  • Loading branch information
pazone authored and mergify[bot] committed Apr 9, 2024
1 parent d53d1a8 commit c329954
Show file tree
Hide file tree
Showing 6 changed files with 358 additions and 101 deletions.
235 changes: 195 additions & 40 deletions .buildkite/auditbeat/auditbeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ name: "beats-auditbeat"

env:
BEATS_PROJECT_NAME: "auditbeat"
<<<<<<< HEAD
=======

ASDF_MAGE_VERSION: 1.15.0

AWS_ARM_INSTANCE_TYPE: "m6g.xlarge"
AWS_IMAGE_UBUNTU_ARM_64: "platform-ingest-beats-ubuntu-2204-aarch64"

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"
>>>>>>> d0a3b457ec (Single pipeline entrypoint (#38783))
IMAGE_UBUNTU_X86_64: "family/platform-ingest-beats-ubuntu-2204"
AWS_IMAGE_UBUNTU_ARM_64: "platform-ingest-beats-ubuntu-2204-aarch64"
IMAGE_RHEL9: "family/platform-ingest-beats-rhel-9"
Expand All @@ -11,58 +27,197 @@ env:
IMAGE_WIN_2016: "family/platform-ingest-beats-windows-2016"
IMAGE_WIN_2019: "family/platform-ingest-beats-windows-2019"
IMAGE_WIN_2022: "family/platform-ingest-beats-windows-2022"
<<<<<<< HEAD
IMAGE_MACOS_X86_64: "generic-13-ventura-x64"
IMAGE_MACOS_ARM: "generic-13-ventura-arm"
GCP_DEFAULT_MACHINE_TYPE: "c2d-highcpu-8"
GCP_HI_PERF_MACHINE_TYPE: "c2d-highcpu-16"
GCP_WIN_MACHINE_TYPE: "n2-standard-8"
AWS_ARM_INSTANCE_TYPE: "m6g.xlarge"
=======

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

notify:
- github_commit_status:
context: "$BEATS_PROJECT_NAME"
>>>>>>> d0a3b457ec (Single pipeline entrypoint (#38783))

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'"

- wait: ~
if: "build.source == 'ui'"
allow_dependency_failure: false
- group: "Auditbeat Mandatory Testing"
key: "auditbeat-mandatory-tests"

steps:
- label: ":ubuntu: Auditbeat Unit Tests"
command: "cd $BEATS_PROJECT_NAME && mage build unitTest"
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"

<<<<<<< HEAD
- label: ":linux: Load dynamic auditbeat pipeline"
key: "auditbeat-pipeline"
command: ".buildkite/auditbeat/generate_auditbeat_pipeline.sh"
notify:
- github_commit_status:
context: "${BEATS_PROJECT_NAME}: Load dynamic pipeline's steps"
=======
- label: ":ubuntu: Auditbeat Unit Tests"
command: "cd $BEATS_PROJECT_NAME && mage build unitTest"
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
artifact_paths:
- "auditbeat/build/*.xml"
- "auditbeat/build/*.json"

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

- label: ":windows: Auditbeat Win-2016 Auditbeat Unit Tests"
command: |
Set-Location -Path $BEATS_PROJECT_NAME
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"

- label: ":windows: Auditbeat Win-2022 Unit Tests"
command: |
Set-Location -Path $BEATS_PROJECT_NAME
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"

- label: ":linux: Auditbeat Crosscompile"
command: "make -C $BEATS_PROJECT_NAME crosscompile"
env:
GOX_FLAGS: "-arch amd64"
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"

- group: "Auditbeat ARM Tests"
key: "auditbeat-extended-tests-arm"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*arm.*/
steps:
- label: ":arm: ARM64 Unit Tests"
key: "auditbeat-extended-arm64-unit-tests"
command: "cd ${BEATS_PROJECT_NAME} && mage build unitTest"
agents:
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"

- group: "Heartbeat MacOS Extended"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/
steps:
- label: ":mac: MacOS Unit Tests"
command: "cd ${BEATS_PROJECT_NAME} && mage unitTest"
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_X86_64}"
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"

- label: ":mac: MacOS ARM Unit Tests"
command: "cd ${BEATS_PROJECT_NAME} && mage unitTest"
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_ARM}"
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"

- group: "Auditbeat Windows Extended Testing"
key: "auditbeat-extended-tests-win"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*windows.*/
steps:
- label: ":windows: Auditbeat Windows 2019 Unit Tests"
key: "auditbeat-extended-win-2019-unit-tests"
command: "mage -d ${BEATS_PROJECT_NAME} unitTest"
agents:
provider: "gcp"
image: "${IMAGE_WIN_2019}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"

- label: ":windows: Auditbeat Windows 10 Unit Tests"
key: "auditbeat-extended-win-10-unit-tests"
command: "mage -d ${BEATS_PROJECT_NAME} unitTest"
agents:
provider: "gcp"
image: "${IMAGE_WIN_10}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"

- label: ":windows: Windows 11 Unit Tests"
key: "auditbeat-extended-win-11-unit-tests"
command: "mage -d ${BEATS_PROJECT_NAME} unitTest"
agents:
provider: "gcp"
image: "${IMAGE_WIN_11}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths: "${BEATS_PROJECT_NAME}/build/*.*"

- group: "Auditbeat Packaging"
key: "auditbeat-packaging"
if: build.env("BUILDKITE_PULL_REQUEST") != "false"
depends_on:
- "auditbeat-mandatory-tests"
steps:
- label: ":ubuntu: Auditbeat/Packaging Linux X86"
key: "auditbeat-package-linux-x86"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
SNAPSHOT: true
command: "cd $BEATS_PROJECT_NAME && mage package"
agents:
provider: gcp
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"

- label: ":linux: Auditbeat/Packaging Linux ARM"
key: "auditbeat-package-linux-arm"
env:
PLATFORMS: "linux/arm64"
PACKAGES: "docker"
SNAPSHOT: true
command: "cd $BEATS_PROJECT_NAME && mage package"
agents:
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
>>>>>>> d0a3b457ec (Single pipeline entrypoint (#38783))
Loading

0 comments on commit c329954

Please sign in to comment.