Skip to content

Commit

Permalink
updated pipeline (elastic#39911)
Browse files Browse the repository at this point in the history
Updated packetbeat pipeline to match common styling && steps from Jenkins on 7.17 branch
  • Loading branch information
oakrizan authored Jun 20, 2024
1 parent 463307e commit 5a16c8f
Showing 1 changed file with 25 additions and 100 deletions.
125 changes: 25 additions & 100 deletions .buildkite/packetbeat/pipeline.packetbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ name: "beats-packetbeat"
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"
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_X86_64: "family/platform-ingest-beats-rhel-9"
IMAGE_UBUNTU_X86_64: "family/platform-ingest-beats-ubuntu-2204"
IMAGE_WIN_10: "family/platform-ingest-beats-windows-10"
IMAGE_WIN_11: "family/platform-ingest-beats-windows-11"
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"

#Deps
ASDF_MAGE_VERSION: 1.15.0
Expand Down Expand Up @@ -53,8 +53,9 @@ steps:

- group: "packetbeat Mandatory Tests"
key: "packetbeat-mandatory-tests"

steps:
- label: ":linux: Ubuntu Unit Tests"
- label: ":ubuntu: Packetbeat Linux x86_64 Unit Tests"
command: |
cd packetbeat
mage build unitTest
Expand All @@ -70,11 +71,13 @@ steps:
- "packetbeat/build/*.json"
notify:
- github_commit_status:
context: "packetbeat: Ubuntu Unit Tests"
context: "packetbeat: Linux x86_64 Unit Tests"

- label: ":linux: Ubuntu ARM Unit Tests"
- label: ":ubuntu: Packetbeat Linux arm64 Unit Tests"
key: "linux-arm64-unit-tests"
command: "cd packetbeat && mage build unitTest"
command: |
cd packetbeat
mage build unitTest
retry:
automatic:
- limit: 3
Expand All @@ -87,9 +90,9 @@ steps:
- "packetbeat/build/*.json"
notify:
- github_commit_status:
context: "packetbeat: Ubuntu ARM Unit Tests"
context: "packetbeat: Linux arm64 Unit Tests"

- label: ":windows: Windows 2019 Unit Tests"
- label: ":windows: Packetbeat Win-2019 Unit Tests"
command: |
Set-Location -Path packetbeat
mage build unitTest
Expand All @@ -107,33 +110,14 @@ steps:
- "packetbeat/build/*.json"
notify:
- github_commit_status:
context: "packetbeat: Windows 2019 Unit Tests"
context: "packetbeat: Win-2019 Unit Tests"

- group: "Extended Windows Tests"
- group: "Packetbeat Extended Windows Tests"
key: "packetbeat-extended-windows-tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*[Ww]indows.*/
steps:
- label: ":windows: Windows 2016 Unit Tests"
command: |
Set-Location -Path packetbeat
mage build unitTest
retry:
automatic:
- limit: 3
agents:
provider: "gcp"
image: "${IMAGE_WIN_2016}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths:
- "packetbeat/build/*.xml"
- "packetbeat/build/*.json"
notify:
- github_commit_status:
context: "packetbeat: Extended Windows 2016 Unit Tests"

- label: ":windows: Windows 2022 Unit Tests"
steps:
- label: ":windows: Packetbeat Win-2016 Unit Tests"
command: |
Set-Location -Path packetbeat
mage build unitTest
Expand All @@ -151,9 +135,9 @@ steps:
- "packetbeat/build/*.json"
notify:
- github_commit_status:
context: "packetbeat: Extended Windows 2022 Unit Tests"
context: "packetbeat: Win-2016 Unit Tests"

- label: ":windows: Windows 10 Unit Tests"
- label: ":windows: Packetbeat Win 10 Unit Tests"
command: |
Set-Location -Path packetbeat
mage build unitTest
Expand All @@ -171,33 +155,13 @@ steps:
- "packetbeat/build/*.json"
notify:
- github_commit_status:
context: "packetbeat: Extended Windows 10 Unit Tests"

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

- group: "Extended Tests"
- group: "Packetbeat Extended Tests"
key: "extended-tests"

steps:
- label: ":mac: MacOS x86_64 Unit Tests"
- label: ":mac: Packetbeat macOS x86_64 Unit Tests"
key: "macos-x86-64-unit-tests-extended"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/
command: |
Expand All @@ -216,46 +180,7 @@ steps:
- "packetbeat/build/*.json"
notify:
- github_commit_status:
context: "packetbeat: Extended MacOS x86_64 Unit Tests"

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

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

- wait: ~
# with PRs, we want to run packaging only if mandatory tests succeed
Expand All @@ -267,7 +192,7 @@ steps:
- group: "Packetbeat Packaging"
key: "packaging"
steps:
- label: ":linux: Packaging Linux"
- label: ":ubuntu: Packetbeat Packaging Linux"
key: "packaging-linux"
command: |
cd packetbeat
Expand All @@ -288,7 +213,7 @@ steps:
- github_commit_status:
context: "packetbeat: Packaging Linux"

- label: ":linux: Packaging ARM"
- label: ":ubuntu: Packetbeat Packaging arm64"
key: "packaging-arm"
command: |
cd packetbeat
Expand All @@ -306,4 +231,4 @@ steps:
PACKAGES: "docker"
notify:
- github_commit_status:
context: "packetbeat: Packaging Linux ARM"
context: "packetbeat: Packaging Linux arm64"

0 comments on commit 5a16c8f

Please sign in to comment.