Skip to content

Commit

Permalink
debug MacOS unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Siarhei Harbuz committed Jan 29, 2024
1 parent b80b600 commit c514ffe
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 48 deletions.
88 changes: 44 additions & 44 deletions .buildkite/metricbeat/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,50 +104,50 @@ steps:
imagePrefix: "${IMAGE_MACOS_X86_64}"
artifact_paths: "metricbeat/build/*.*"

- group: "Extended Windowds Tests"
key: "extended-win-tests"
if: "${ALLOW_EXTENDED_WIN_TESTS}"
steps:
- label: ":windows: Win 2019 Unit Tests"
key: "extended-win-2019-unit-tests"
command: ".buildkite/scripts/win_unit_tests.ps1"
agents:
provider: "gcp"
image: "${IMAGE_WIN_2019}"
machine_type: "n2-standard-8"
disk_size: 100
disk_type: "pd-ssd"
artifact_paths: "metricbeat/build/*.*"
# - group: "Extended Windowds Tests"
# key: "extended-win-tests"
# if: "${ALLOW_EXTENDED_WIN_TESTS}"
# steps:
# - label: ":windows: Win 2019 Unit Tests"
# key: "extended-win-2019-unit-tests"
# command: ".buildkite/scripts/win_unit_tests.ps1"
# agents:
# provider: "gcp"
# image: "${IMAGE_WIN_2019}"
# machine_type: "n2-standard-8"
# disk_size: 100
# disk_type: "pd-ssd"
# artifact_paths: "metricbeat/build/*.*"

- group: "Packaging" # TODO: check conditions for future the main pipeline migration: https://github.com/elastic/beats/pull/28589
key: "packaging"
if: ${ALLOW_PACKAGING}
steps:
- label: ":linux: Packaging Linux"
key: "packaging-linux"
command: ".buildkite/scripts/packaging.sh"
agents:
provider: "gcp"
image: "${IMAGE_UBUNTU_X86_64}"
machineType: "c2-standard-16"
env:
PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"
# - group: "Packaging" # TODO: check conditions for future the main pipeline migration: https://github.com/elastic/beats/pull/28589
# key: "packaging"
# if: ${ALLOW_PACKAGING}
# steps:
# - label: ":linux: Packaging Linux"
# key: "packaging-linux"
# command: ".buildkite/scripts/packaging.sh"
# agents:
# provider: "gcp"
# image: "${IMAGE_UBUNTU_X86_64}"
# machineType: "c2-standard-16"
# env:
# PLATFORMS: "+all linux/amd64 linux/arm64 windows/amd64 darwin/amd64 darwin/arm64"

- label: ":linux: Packaging ARM"
key: "packaging-arm"
command: ".buildkite/scripts/packaging.sh"
agents:
provider: "aws"
imagePrefix: "${IMAGE_UBUNTU_ARM_64}"
instanceType: "t4g.xlarge"
env:
PLATFORMS: "linux/arm64"
PACKAGES: "docker"
# - label: ":linux: Packaging ARM"
# key: "packaging-arm"
# command: ".buildkite/scripts/packaging.sh"
# agents:
# provider: "aws"
# imagePrefix: "${IMAGE_UBUNTU_ARM_64}"
# instanceType: "t4g.xlarge"
# env:
# PLATFORMS: "linux/arm64"
# PACKAGES: "docker"

depends_on:
- step: "mandatory-tests"
allow_failure: false
- step: "extended-tests"
allow_failure: true
- step: "extended-win-tests"
allow_failure: true
# depends_on:
# - step: "mandatory-tests"
# allow_failure: false
# - step: "extended-tests"
# allow_failure: true
# - step: "extended-win-tests"
# allow_failure: true
10 changes: 6 additions & 4 deletions .buildkite/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,15 @@ retry() {
are_paths_changed() {
local patterns=("${@}")
local changelist=()

for pattern in "${patterns[@]}"; do
changed_files=$(git diff --name-only HEAD@{1} HEAD | grep -E "$pattern")
if [ -n "$changed_files" ]; then
changelist+=("${changed_files}")
changed_files=($(git diff --name-only HEAD@{1} HEAD | grep -P "$pattern"))
if [ "${#changed_files[@]}" -gt 0 ]; then
changelist+=("${changed_files[@]}")
fi
done
if [[ -n "${changelist[@]}" ]]; then

if [ "${#changelist[@]}" -gt 0 ]; then
echo "Files changed:"
echo "${changelist[*]}"
return 0
Expand Down

0 comments on commit c514ffe

Please sign in to comment.