Skip to content

Commit

Permalink
updated scripts && enbaled macos step
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed Oct 14, 2024
1 parent d2f7b38 commit f7a7569
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 57 deletions.
5 changes: 4 additions & 1 deletion .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-packetbeat" && "$BUILDKITE_STEP
export PRIVATE_CI_GCS_CREDENTIALS_SECRET
fi

if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-agentbeat" ]]; then
if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-agentbeat" && "$BUILDKITE_STEP_KEY" == *"agentbeat-it"* ]]; then
if [[ "$BUILDKITE_STEP_KEY" == *"macos"* ]]; then
ulimit -Sn 10000
fi
AGENTBEAT_PATH=$(.buildkite/scripts/agentbeat/setup_agentbeat.py)
export AGENTBEAT_PATH
fi
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/agentbeat/setup_agentbeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def download_agentbeat(pattern, path) -> str:
try:
subprocess.run(
['buildkite-agent', 'artifact', 'download', pattern, '.',
'--build', '01924d2b-b061-45ae-a106-e885584ff26f',
# '--build', '01924d2b-b061-45ae-a106-e885584ff26f',
'--step', 'agentbeat-package-linux'],
check=True, stdout=sys.stdout, stderr=sys.stderr, text=True)
except subprocess.CalledProcessError:
Expand Down
110 changes: 55 additions & 55 deletions .buildkite/x-pack/pipeline.xpack.agentbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ env:
AGENTBEAT_SPEC: "./agentbeat.spec.yml"

steps:
# - group: "Check/Update"
# key: "x-pack-agentbeat-check-update"
#
# steps:
# - label: "agentbeat: Run pre-commit"
# command: "pre-commit run --all-files"
# agents:
# image: "${IMAGE_BEATS_WITH_HOOKS_LATEST}"
# memory: "2Gi"
# useCustomGlobalHooks: true
# notify:
# - github_commit_status:
# context: "agentbeat: pre-commit"
- group: "Check/Update"
key: "x-pack-agentbeat-check-update"

steps:
- label: "agentbeat: Run pre-commit"
command: "pre-commit run --all-files"
agents:
image: "${IMAGE_BEATS_WITH_HOOKS_LATEST}"
memory: "2Gi"
useCustomGlobalHooks: true
notify:
- github_commit_status:
context: "agentbeat: pre-commit"

# - wait: ~
# # with PRs, we want to run mandatory tests only if check/update step succeed
Expand All @@ -40,32 +40,32 @@ steps:
key: "agentbeat-mandatory-tests"

steps:
# - label: ":linux: Agentbeat packaging Linux"
# key: "agentbeat-package-linux"
# env:
# PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
# SNAPSHOT: true
# command: |
# set -euo pipefail
# cd x-pack/agentbeat
# mage package
# artifact_paths:
# - x-pack/agentbeat/build/distributions/**/*
# - "x-pack/agentbeat/build/*.xml"
# - "x-pack/agentbeat/build/*.json"
# retry:
# automatic:
# - limit: 2
# 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: Packaging"
- label: ":linux: Agentbeat packaging Linux"
key: "agentbeat-package-linux"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
SNAPSHOT: true
command: |
set -euo pipefail
cd x-pack/agentbeat
mage package
artifact_paths:
- x-pack/agentbeat/build/distributions/**/*
- "x-pack/agentbeat/build/*.xml"
- "x-pack/agentbeat/build/*.json"
retry:
automatic:
- limit: 2
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: Packaging"

# - label: ":linux: Agentbeat/Integration tests Linux"
# key: "agentbeat-it-linux"
Expand Down Expand Up @@ -113,8 +113,8 @@ steps:
key: "agentbeat-it-linux"
env:
PLATFORM: "linux/amd64"
# depends_on:
# - agentbeat-package-linux
depends_on:
- agentbeat-package-linux
command: |
cd x-pack/agentbeat
mage -v testWithSpec
Expand All @@ -129,8 +129,8 @@ steps:
key: "agentbeat-it-windows"
env:
PLATFORM: "windows/amd64"
# depends_on:
# - agentbeat-package-linux
depends_on:
- agentbeat-package-linux
command: |
Set-Location -Path x-pack/agentbeat
mage -v testWithSpec
Expand All @@ -140,18 +140,18 @@ steps:
machine_type: "${GCP_WIN_MACHINE_TYPE}"
disk_size: 200
disk_type: "pd-ssd"
#
# - label: ":linux: Agentbeat/Integration tests macOS"
# key: "agentbeat-it-macos"
# depends_on:
# - agentbeat-package-linux
# command: |
# set -euo pipefail
# ./.buildkite/scripts/agentbeat/setup_agentbeat.py
# agents:
# provider: "orka"
# imagePrefix: "${IMAGE_MACOS_X86_64}"
#

- label: ":macos: x-pack/agentbeat: macOS x86_64 Spec tests"
key: "agentbeat-it-macos"
depends_on:
- agentbeat-package-linux
command: |
cd x-pack/agentbeat
mage -v testWithSpec
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_X86_64}"

# - label: ":linux: Agentbeat/Integration tests macOS arm64"
# key: "agentbeat-it-macos-arm"
# depends_on:
Expand Down

0 comments on commit f7a7569

Please sign in to comment.