Skip to content

Commit

Permalink
added macos arm step
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed Oct 17, 2024
1 parent deef76e commit 3460f86
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 56 deletions.
7 changes: 6 additions & 1 deletion .buildkite/scripts/agentbeat/setup_agentbeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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:
Expand Down
88 changes: 33 additions & 55 deletions .buildkite/x-pack/pipeline.xpack.agentbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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}"

0 comments on commit 3460f86

Please sign in to comment.