Skip to content

Commit

Permalink
Merge branch '7.17' into updatecli_7.17_bump-golang-version-7.17
Browse files Browse the repository at this point in the history
  • Loading branch information
cmacknz authored Jun 17, 2024
2 parents 9479be2 + 666c446 commit 5c7d743
Show file tree
Hide file tree
Showing 25 changed files with 97 additions and 166 deletions.
2 changes: 1 addition & 1 deletion .buildkite/filebeat/filebeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ steps:
- label: ":ubuntu: Filebeat Go Integration Tests"
command: |
cd filebeat
mage goIntegTest
mage -v goIntegTest
retry:
automatic:
- limit: 3
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/heartbeat/heartbeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ steps:
echo "~~~ Running tests"
cd heartbeat
mage goIntegTest
mage -v goIntegTest
retry:
automatic:
- limit: 3
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/libbeat/pipeline.libbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ steps:
command: |
set -euo pipefail
cd libbeat
mage goIntegTest
mage -v goIntegTest
retry:
automatic:
- limit: 3
Expand Down
155 changes: 42 additions & 113 deletions .buildkite/metricbeat/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@
name: "beats-metricbeat"

env:
AWS_ARM_INSTANCE_TYPE: "t4g.xlarge"
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_UBUNTU_ARM_64: "platform-ingest-beats-ubuntu-2204-aarch64"
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"

# Integration Tests
K8S_VERSION: "v1.29.0"
K8S_VERSION: "v1.21.1"
ASDF_KIND_VERSION: "0.20.0"

# Other deps
Expand All @@ -33,9 +31,11 @@ steps:
- group: "Metricbeat Mandatory Tests"
key: "metricbeat-mandatory-tests"
steps:
- label: ":linux: Ubuntu Unit Tests"
- label: ":ubuntu: Metricbeat Linux x86_64 Unit Tests"
key: "mandatory-linux-unit-test"
command: "cd metricbeat && mage build unitTest"
command: |
cd metricbeat
mage build unitTest
retry:
automatic:
- limit: 3
Expand All @@ -48,28 +48,20 @@ steps:
- "metricbeat/build/*.json"
notify:
- github_commit_status:
context: "metricbeat: Ubuntu Unit Tests"
context: "metricbeat: Linux x86_64 Unit Tests"

- label: ":go: Go Integration Tests"
- label: ":ubuntu: Metricbeat Go Integration Tests"
key: "mandatory-int-test"
command: |
set -euo pipefail
# defines the MODULE env var based on what's changed in a PR
source .buildkite/scripts/changesets.sh
defineModuleFromTheChangeSet metricbeat
echo "~~~ Running tests"
# TODO move this section to base image / pre-command hook
# echo "~~~ Installing kind"
# asdf plugin add kind
# asdf install kind $ASDF_KIND_VERSION
# .buildkite/deploy/kubernetes/scripts/kind-setup.sh
echo "~~~ Running tests"
# uncomment line below (which causes skipping of module kubeconfig) when https://github.com/elastic/beats/issues/38874 has been resolved.
# export KUBECONFIG="$$PWD/kubecfg"
cd metricbeat && mage goIntegTest
export KUBECONFIG="$$PWD/kubecfg"
cd metricbeat
mage -v goIntegTest
retry:
automatic:
- limit: 3
Expand All @@ -84,25 +76,18 @@ steps:
- github_commit_status:
context: "metricbeat: Go Integration Tests"

- label: ":python: Python Integration Tests"
- label: ":ubuntu: Python Integration Tests"
key: "mandatory-python-int-test"
command: |
set -euo pipefail
# defines the MODULE env var based on what's changed in a PR
source .buildkite/scripts/changesets.sh
defineModuleFromTheChangeSet metricbeat
echo "~~~ Running tests"
# TODO move this section to base image / pre-command hook
echo "~~~ Installing kind"
asdf plugin add kind
asdf install kind $ASDF_KIND_VERSION
.buildkite/deploy/kubernetes/scripts/kind-setup.sh
echo "~~~ Running tests"
export KUBECONFIG="$$PWD/kubecfg"
cd metricbeat && mage pythonIntegTest
cd metricbeat
mage pythonIntegTest
retry:
automatic:
- limit: 3
Expand All @@ -117,7 +102,7 @@ steps:
- github_commit_status:
context: "metricbeat: Python Integration Tests"

- label: ":negative_squared_cross_mark: Cross compile"
- label: ":ubuntu: Metricbeat Crosscompile"
key: "mandatory-cross-compile"
command: "make -C metricbeat crosscompile"
retry:
Expand All @@ -132,40 +117,19 @@ steps:
- "metricbeat/build/*.json"
notify:
- github_commit_status:
context: "metricbeat: Cross compile"
context: "metricbeat: Crosscompile"

- label: ":windows: Windows 2016 Unit Tests"
- label: ":windows: Metricbeat Win-2019 Unit Tests"
command: |
Set-Location -Path metricbeat
mage build unitTest
key: "mandatory-win-2016-unit-tests"
key: "mandatory-win-2019-unit-tests"
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:
- "metricbeat/build/*.xml"
- "metricbeat/build/*.json"
notify:
- github_commit_status:
context: "metricbeat: Windows 2016 Unit Tests"

- label: ":windows: Windows 2022 Unit Tests"
command: |
Set-Location -Path metricbeat
mage build unitTest
key: "mandatory-win-2022-unit-tests"
retry:
automatic:
- limit: 3
agents:
provider: "gcp"
image: "${IMAGE_WIN_2022}"
image: "${IMAGE_WIN_2019}"
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
Expand All @@ -174,13 +138,14 @@ steps:
- "metricbeat/build/*.json"
notify:
- github_commit_status:
context: "metricbeat: Windows 2022 Unit Tests"
context: "metricbeat: Win-2019 Unit Tests"

- group: "Metricbeat Extended Windows Tests"
key: "metricbeat-extended-win-tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*[Ww]indows.*/

steps:
- label: ":windows: Windows 10 Unit Tests"
- label: ":windows: Metricbeat Win 10 Unit Tests"
command: |
Set-Location -Path metricbeat
mage build unitTest
Expand All @@ -199,40 +164,19 @@ steps:
- "metricbeat/build/*.json"
notify:
- github_commit_status:
context: "metricbeat: Extended Windows 10 Unit Tests"

- label: ":windows: Windows 11 Unit Tests"
command: |
Set-Location -Path metricbeat
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:
- "metricbeat/build/*.xml"
- "metricbeat/build/*.json"
notify:
- github_commit_status:
context: "metricbeat: Extended Windows 11 Unit Tests"
context: "metricbeat: Win 10 Unit Tests"

- label: ":windows: Windows 2019 Unit Tests"
- label: ":windows: Metricbeat Win-2016 Unit Tests"
command: |
Set-Location -Path metricbeat
mage build unitTest
key: "extended-win-2019-unit-tests"
key: "extended-win-2016-unit-tests"
retry:
automatic:
- limit: 3
agents:
provider: "gcp"
image: "${IMAGE_WIN_2019}"
image: "${IMAGE_WIN_2016}"
machineType: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 100
disk_type: "pd-ssd"
Expand All @@ -241,13 +185,14 @@ steps:
- "metricbeat/build/*.json"
notify:
- github_commit_status:
context: "metricbeat: Extended Windows 2019 Unit Tests"
context: "metricbeat: Win-2016 Unit Tests"

- group: "Metricbeat Extended MacOS Tests"
- group: "Metricbeat Extended macOS Tests"
key: "metricbeat-extended-macos-tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/

steps:
- label: ":mac: MacOS x64_64 Unit Tests"
- label: ":mac: Metricbeat macOS x64_64 Unit Tests"
key: "extended-macos-x64-64-unit-tests"
command: |
set -euo pipefail
Expand All @@ -264,27 +209,7 @@ steps:
- "metricbeat/build/*.json"
notify:
- github_commit_status:
context: "metricbeat: Extended MacOS x86_64 Unit Tests"

- label: ":mac: MacOS arm64 Unit Tests"
key: "extended-macos-arm64-unit-tests"
skip: "due to https://github.com/elastic/beats/issues/33035"
command: |
set -euo pipefail
source .buildkite/scripts/install_macos_tools.sh
cd metricbeat && mage build unitTest
retry:
automatic:
- limit: 3
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_ARM}"
artifact_paths:
- "metricbeat/build/*.xml"
- "metricbeat/build/*.json"
notify:
- github_commit_status:
context: "metricbeat: Extended MacOS arm64 Unit Tests"
context: "metricbeat: EmacOS x86_64 Unit Tests"

- wait: ~
# with PRs, we want to run packaging only if mandatory tests succeed
Expand All @@ -296,9 +221,11 @@ steps:
- group: "Metricbeat Packaging"
key: "metricbeat-packaging"
steps:
- label: ":linux: Packaging Linux"
- label: ":ubuntu: Metricbeat Packaging Linux"
key: "packaging-linux"
command: "cd metricbeat && mage package"
command: |
cd metricbeat
mage package
retry:
automatic:
- limit: 3
Expand All @@ -315,20 +242,22 @@ steps:
- github_commit_status:
context: "metricbeat: Packaging Linux"

- label: ":linux: Packaging ARM"
- label: ":ubuntu: Metricbeat Packaging Linux arm64"
key: "packaging-arm"
command: "cd metricbeat && mage package"
command: |
cd metricbeat
mage package
retry:
automatic:
- limit: 3
timeout_in_minutes: 20
agents:
provider: "aws"
imagePrefix: "${IMAGE_UBUNTU_ARM_64}"
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
env:
PLATFORMS: "linux/arm64"
PACKAGES: "docker"
notify:
- github_commit_status:
context: "metricbeat: Packaging Linux ARM"
context: "metricbeat: Packaging Linux arm64"
2 changes: 1 addition & 1 deletion .buildkite/scripts/go_int_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ set -euo pipefail
echo "--- Run Go Intergration Tests for $BEATS_PROJECT_NAME"
pushd "${BEATS_PROJECT_NAME}" > /dev/null

mage goIntegTest
mage -v goIntegTest

popd > /dev/null
Loading

0 comments on commit 5c7d743

Please sign in to comment.