From b5023e45f85c216c2ddb37f0d285ba0c2569b63f Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Sat, 27 Apr 2024 11:52:52 +0300 Subject: [PATCH] updated auditbeat --- .buildkite/auditbeat/auditbeat-pipeline.yml | 111 +++++++++++++++----- 1 file changed, 82 insertions(+), 29 deletions(-) diff --git a/.buildkite/auditbeat/auditbeat-pipeline.yml b/.buildkite/auditbeat/auditbeat-pipeline.yml index 801768c271ec..d5ed4abac79a 100644 --- a/.buildkite/auditbeat/auditbeat-pipeline.yml +++ b/.buildkite/auditbeat/auditbeat-pipeline.yml @@ -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" @@ -30,6 +29,7 @@ steps: steps: - label: ":ubuntu: Auditbeat Unit Tests" command: | + set -euo pipefail cd auditbeat mage build unitTest agents: @@ -45,6 +45,7 @@ steps: - label: ":rhel: Auditbeat Unit Tests" command: | + set -euo pipefail cd auditbeat mage build unitTest agents: @@ -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: | @@ -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" @@ -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" @@ -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" @@ -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 @@ -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 @@ -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: @@ -240,6 +292,7 @@ steps: PACKAGES: "docker" SNAPSHOT: true command: | + set -euo pipefail cd auditbeat mage package agents: