From 3460f86be479a33dfe535d9fe773ef0896b5ae91 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Thu, 17 Oct 2024 12:33:04 +0300 Subject: [PATCH] added macos arm step --- .../scripts/agentbeat/setup_agentbeat.py | 7 +- .../x-pack/pipeline.xpack.agentbeat.yml | 88 +++++++------------ 2 files changed, 39 insertions(+), 56 deletions(-) diff --git a/.buildkite/scripts/agentbeat/setup_agentbeat.py b/.buildkite/scripts/agentbeat/setup_agentbeat.py index b5f148a18cc..28cfb95f9e6 100755 --- a/.buildkite/scripts/agentbeat/setup_agentbeat.py +++ b/.buildkite/scripts/agentbeat/setup_agentbeat.py @@ -12,10 +12,12 @@ def log(msg): sys.stdout.write(f'{msg}\n') sys.stdout.flush() + def log_err(msg): sys.stderr.write(f'{msg}\n') sys.stderr.flush() + def get_os() -> str: return platform.system().lower() @@ -26,7 +28,10 @@ def get_arch() -> str: if arch == 'amd64': return 'x86_64' else: - return arch + if get_os == 'darwin': + return 'aarch64' + else: + return arch def get_artifact_extension(agent_os) -> str: diff --git a/.buildkite/x-pack/pipeline.xpack.agentbeat.yml b/.buildkite/x-pack/pipeline.xpack.agentbeat.yml index da66c718658..adfea27a285 100644 --- a/.buildkite/x-pack/pipeline.xpack.agentbeat.yml +++ b/.buildkite/x-pack/pipeline.xpack.agentbeat.yml @@ -67,49 +67,7 @@ steps: - github_commit_status: context: "agentbeat: Packaging" - # - label: ":linux: Agentbeat/Integration tests Linux" - # key: "agentbeat-it-linux" - # depends_on: - # - agentbeat-package-linux - # env: - # ASDF_NODEJS_VERSION: 18.17.1 - # PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64" - # SNAPSHOT: true - # command: | - # set -euo pipefail - # echo "~~~ Downloading artifacts" - # buildkite-agent artifact download x-pack/agentbeat/build/distributions/** . --step 'agentbeat-package-linux' - # ls -lah x-pack/agentbeat/build/distributions/ - # echo "~~~ Installing @elastic/synthetics with npm" - # npm install -g @elastic/synthetics - # echo "~~~ Running tests" - # cd x-pack/agentbeat - # mage goIntegTest - # artifact_paths: - # - x-pack/agentbeat/build/distributions/**/* - # - "x-pack/agentbeat/build/*.xml" - # - "x-pack/agentbeat/build/*.json" -# plugins: -# - test-collector#v1.10.2: -# files: "x-pack/agentbeat/build/TEST-*.xml" -# format: "junit" -# branches: "main" -# debug: true - # retry: - # automatic: - # - limit: 1 - # timeout_in_minutes: 60 - # agents: - # provider: "gcp" - # image: "${IMAGE_UBUNTU_X86_64}" - # machineType: "${GCP_HI_PERF_MACHINE_TYPE}" - # disk_size: 100 - # disk_type: "pd-ssd" - # notify: - # - github_commit_status: - # context: "agentbeat: Integration tests" - - - label: ":linux: x-pack/agentbeat: Ubuntu x86_64 Spec tests" + - label: ":ubuntu: x-pack/agentbeat: Ubuntu x86_64 Spec tests" key: "agentbeat-it-linux" env: PLATFORM: "linux/amd64" @@ -125,6 +83,22 @@ steps: disk_size: 100 disk_type: "pd-ssd" + - label: ":ubuntu: x-pack/agentbeat: Ubuntu arm64 Spec tests" + key: "agentbeat-it-linux" + env: + PLATFORM: "linux/arm64" + depends_on: + - agentbeat-package-linux + command: | + cd x-pack/agentbeat + mage -v testWithSpec + agents: + provider: "gcp" + image: "${IMAGE_UBUNTU_X86_64}" + machineType: "${GCP_HI_PERF_MACHINE_TYPE}" + disk_size: 100 + disk_type: "pd-ssd" + - label: ":windows: x-pack/agentbeat: Windows x86_64 Spec tests" key: "agentbeat-it-windows" env: @@ -143,10 +117,10 @@ steps: - label: ":macos: x-pack/agentbeat: macOS x86_64 Spec tests" key: "agentbeat-it-macos" - env: - PLATFORM: "darwin/amd64" depends_on: - agentbeat-package-linux + env: + PLATFORM: "darwin/amd64" command: | set -euo pipefail source .buildkite/scripts/install_macos_tools.sh @@ -156,13 +130,17 @@ steps: provider: "orka" imagePrefix: "${IMAGE_MACOS_X86_64}" -# - label: ":linux: Agentbeat/Integration tests macOS arm64" -# key: "agentbeat-it-macos-arm" -# depends_on: -# - agentbeat-package-linux -# command: | -# cd x-pack/agentbeat -# mage -v testWithSpec -# agents: -# provider: "orka" -# imagePrefix: "${IMAGE_MACOS_ARM}" + - label: ":macos: Agentbeat/Integration tests macOS arm64" + key: "agentbeat-it-macos-arm" + depends_on: + - agentbeat-package-linux + env: + PLATFORM: "darwin/arm64" + command: | + set -euo pipefail + source .buildkite/scripts/install_macos_tools.sh + cd x-pack/agentbeat + mage -v testWithSpec + agents: + provider: "orka" + imagePrefix: "${IMAGE_MACOS_ARM}"