Skip to content

Commit

Permalink
Merge branch '8.13' into mergify/bp/8.13/pr-38828
Browse files Browse the repository at this point in the history
  • Loading branch information
dliappis committed Apr 17, 2024
2 parents 295e5b1 + 829f53e commit c64a52b
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 178 deletions.
1 change: 0 additions & 1 deletion .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ fi
ENABLED_BEATS_PIPELINES_SLUGS=(
"auditbeat"
"filebeat"
"beats-libbeat"
"beats-metricbeat"
"beats-packetbeat"
"beats-winlogbeat"
Expand Down
143 changes: 105 additions & 38 deletions .buildkite/libbeat/pipeline.libbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,117 @@ name: "beats-libbeat"
env:
AWS_ARM_INSTANCE_TYPE: "t4g.xlarge"
AWS_IMAGE_UBUNTU_ARM_64: "platform-ingest-beats-ubuntu-2004-aarch64"
BEATS_PROJECT_NAME: "libbeat"
GCP_DEFAULT_MACHINE_TYPE: "c2d-highcpu-8"
GCP_HI_PERF_MACHINE_TYPE: "c2d-highcpu-16"
IMAGE_UBUNTU_X86_64: "family/platform-ingest-beats-ubuntu-2204"

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

#Deps
ASDF_MAGE_VERSION: 1.15.0

steps:
- group: "Mandatory Tests"
key: "mandatory-tests"
steps:
- label: ":linux: Ubuntu Unit Tests"
key: "mandatory-linux-unit-test"
command: |
set -euo pipefail
cd libbeat
mage build unitTest
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
notify:
- github_commit_status:
context: "libbeat: Ununtu Unit Tests"

- label: ":go: Go Integration Tests"
key: "mandatory-int-test"
command: |
set -euo pipefail
cd libbeat
mage goIntegTest
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
notify:
- github_commit_status:
context: "libbeat: Go Integration Tests"

- label: ":python: Python Integration Tests"
key: "mandatory-python-int-test"
command: |
set -euo pipefail
cd libbeat
mage pythonIntegTest
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
notify:
- github_commit_status:
context: "libbeat: Python Integration Tests"

- label: ":negative_squared_cross_mark: Cross compile"
key: "mandatory-cross-compile"
command: |
set -euo pipefail
cd libbeat
make crosscompile
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_HI_PERF_MACHINE_TYPE}"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
notify:
- github_commit_status:
context: "libbeat: Cross compile"

- label: ":testengine: Stress Tests"
key: "mandatory-stress-test"
command: |
set -euo pipefail
cd libbeat
make STRESS_TEST_OPTIONS='-timeout=20m -race -v -parallel 1' GOTEST_OUTPUT_OPTIONS=' | go-junit-report > libbeat-stress-test.xml' stress-tests
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "${GCP_DEFAULT_MACHINE_TYPE}"
artifact_paths: "libbeat/libbeat-stress-test.xml"
notify:
- github_commit_status:
context: "libbeat: Stress Tests"

- input: "Input Parameters"
key: "input-run-all-stages"
fields:
- select: "Libbeat - run_libbeat"
key: "run_libbeat"
options:
- label: "True"
value: "true"
- label: "False"
value: "false"
default: "false"
- select: "Libbeat - run_libbeat_arm_tests"
key: "run_libbeat_arm_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

- label: ":linux: Load dynamic Libbeat pipeline"
key: "libbeat-pipeline"
command: ".buildkite/scripts/generate_libbeat_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"
- group: "Extended Tests"
key: "extended-tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*arm.*/
steps:
- label: ":linux: Ubuntu ARM64 Unit Tests"
key: "extended-arm64-unit-tests"
command: |
set -euo pipefail
cd libbeat
mage build unitTest
agents:
provider: "aws"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
artifact_paths:
- "libbeat/build/*.xml"
- "libbeat/build/*.json"
notify:
- github_commit_status:
context: "libbeat: Ubuntu ARM64 Unit Tests"
3 changes: 2 additions & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ steps:
- label: "Trigger Libbeat"
plugins:
- monorepo-diff#v1.0.1:
diff: "git diff --name-only ${GITHUB_PR_TARGET_BRANCH}...HEAD"
diff: "git diff --name-only origin/${GITHUB_PR_TARGET_BRANCH}...HEAD"
watch:
- path:
- libbeat/
Expand All @@ -257,6 +257,7 @@ steps:
branch: "${BUILDKITE_BRANCH}"
env:
- BUILDKITE_PULL_REQUEST=${BUILDKITE_PULL_REQUEST}
- BUILDKITE_PULL_REQUEST_BASE_BRANCH=${BUILDKITE_PULL_REQUEST_BASE_BRANCH}
- GITHUB_PR_LABELS=${GITHUB_PR_LABELS}

- label: "Trigger x-pack/auditbeat"
Expand Down
16 changes: 0 additions & 16 deletions .buildkite/pull-requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,6 @@
"skip_ci_on_only_changed": [ ],
"always_require_ci_on_changed": [ ]
},
{
"enabled": true,
"pipelineSlug": "beats-libbeat",
"allow_org_users": true,
"allowed_repo_permissions": ["admin", "write"],
"allowed_list": [ ],
"set_commit_status": true,
"build_on_commit": true,
"build_on_comment": true,
"trigger_comment_regex": "^/test libbeat$|^/test filebeat",
"always_trigger_comment_regex": "^/test libbeat$",
"skip_ci_labels": [ ],
"skip_target_branches": [ ],
"skip_ci_on_only_changed": [ ],
"always_require_ci_on_changed": ["^go.mod", "^pytest.ini", "^dev-tools/.*", "^libbeat/.*", "^testing/.*"]
},
{
"enabled": true,
"pipelineSlug": "beats-packetbeat",
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ONLY_DOCS=${ONLY_DOCS:-"true"}
OSS_MODULE_PATTERN="^[a-z0-9]+beat\\/module\\/([^\\/]+)\\/.*"
XPACK_MODULE_PATTERN="^x-pack\\/[a-z0-9]+beat\\/module\\/([^\\/]+)\\/.*"
# define if needed run the whole pipeline for the particular beat
[ -z "${run_libbeat+x}" ] && run_libbeat="$(buildkite-agent meta-data get run_libbeat --default "false")"
[ -z "${run_filebeat+x}" ] && run_filebeat="$(buildkite-agent meta-data get run_filebeat --default "false")"
[ -z "${run_packetbeat+x}" ] && run_packetbeat="$(buildkite-agent meta-data get run_packetbeat --default "false")"
[ -z "${run_winlogbeat+x}" ] && run_winlogbeat="$(buildkite-agent meta-data get run_winlogbeat --default "false")"
[ -z "${run_xpack_libbeat+x}" ] && run_xpack_libbeat="$(buildkite-agent meta-data get run_xpack_libbeat --default "false")"
Expand All @@ -22,7 +22,7 @@ XPACK_MODULE_PATTERN="^x-pack\\/[a-z0-9]+beat\\/module\\/([^\\/]+)\\/.*"
[ -z "${run_xpack_heartbeat+x}" ] && run_xpack_heartbeat="$(buildkite-agent meta-data get run_xpack_heartbeat --default "false")"

# define if needed run ARM platform-specific tests for the particular beat
[ -z "${run_libbeat_arm_tests+x}" ] && run_libbeat_arm_tests="$(buildkite-agent meta-data get run_libbeat_arm_tests --default "false")"
[ -z "${run_filebeat_arm_tests+x}" ] && run_filebeat_arm_tests="$(buildkite-agent meta-data get run_filebeat_arm_tests --default "false")"
[ -z "${run_packetbeat_arm_tests+x}" ] && run_packetbeat_arm_tests="$(buildkite-agent meta-data get run_packetbeat_arm_tests --default "false")"
[ -z "${run_xpack_filebeat_arm_tests+x}" ] && run_xpack_filebeat_arm_tests="$(buildkite-agent meta-data get run_xpack_filebeat_arm_tests --default "false")"
[ -z "${run_xpack_libbeat_arm_tests+x}" ] && run_xpack_libbeat_arm_tests="$(buildkite-agent meta-data get run_xpack_libbeat_arm_tests --default "false")"
Expand Down
120 changes: 0 additions & 120 deletions .buildkite/scripts/generate_libbeat_pipeline.sh

This file was deleted.

0 comments on commit c64a52b

Please sign in to comment.