Skip to content

Commit

Permalink
pr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed Apr 18, 2024
1 parent befd3ef commit d41b2ba
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 8 deletions.
60 changes: 57 additions & 3 deletions .buildkite/heartbeat/heartbeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ steps:
key: "heartbeat-mandatory-tests"

steps:
- label: ":ubuntu: Unit Tests"
- label: ":ubuntu: Heartbeat Unit Tests"
command: |
cd heartbeat
mage build unitTest
Expand All @@ -37,6 +37,9 @@ steps:
artifact_paths:
- "heartbeat/build/*.xml"
- "heartbeat/build/*.json"
notify:
- github_commit_status:
context: "Heartbeat: Ubuntu Unit Tests"

- label: ":rhel: Heartbeat Rhel9 Unit Tests"
command: |
Expand All @@ -49,8 +52,11 @@ steps:
artifact_paths:
- "heartbeat/build/*.xml"
- "heartbeat/build/*.json"
notify:
- github_commit_status:
context: "Heartbeat: Rhel9 Unit Tests"

- label: ":windows: Heartbeat Win-2016 Unit Test"
- label: ":windows: Heartbeat Win-2016 Unit Tests"
key: "windows-2016"
command: |
Set-Location -Path heartbeat
Expand All @@ -63,6 +69,9 @@ steps:
artifact_paths:
- "heartbeat/build/*.xml"
- "heartbeat/build/*.json"
notify:
- github_commit_status:
context: "Heartbeat: Win-2016 Unit Tests"

- label: ":windows: Heartbeat Win-2022 Unit Test"
key: "windows-2022"
Expand All @@ -77,6 +86,9 @@ steps:
artifact_paths:
- "heartbeat/build/*.xml"
- "heartbeat/build/*.json"
notify:
- github_commit_status:
context: "Heartbeat: Win-2022 Unit Tests"

- label: ":ubuntu: Heartbeat Go Integration Tests"
command: |
Expand All @@ -89,6 +101,9 @@ steps:
artifact_paths:
- "heartbeat/build/*.xml"
- "heartbeat/build/*.json"
notify:
- github_commit_status:
context: "Heartbeat: Go Integration Tests"

- label: ":ubuntu: Heartbeat Python Integration Tests"
command: |
Expand All @@ -101,6 +116,9 @@ steps:
artifact_paths:
- "heartbeat/build/*.xml"
- "heartbeat/build/*.json"
notify:
- github_commit_status:
context: "Heartbeat: Python Integration Tests"

- group: "Heartbeat ARM Tests"
key: "heartbeat-extended-tests-arm"
Expand All @@ -117,6 +135,9 @@ steps:
imagePrefix: "${AWS_IMAGE_UBUNTU_ARM_64}"
instanceType: "${AWS_ARM_INSTANCE_TYPE}"
artifact_paths: "heartbeat/build/*.xml"
notify:
- github_commit_status:
context: "Heartbeat: Ubuntu ARM64 Unit Tests"

- group: "Heartbeat Extended Testing MacOS"
key: "heartbeat-extended-tests-macos"
Expand All @@ -126,12 +147,36 @@ steps:
- label: ":mac: Heartbeat MacOS Unit Tests"
key: "macos-extended"
command: |
set -euo pipefail
source .buildkite/scripts/install_macos_tools.sh
cd heartbeat
mage build unitTest
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_X86_64}"
artifact_paths: "heartbeat/build/*.xml"
artifact_paths:
- "metricbeat/build/*.xml"
- "metricbeat/build/*.json"
notify:
- github_commit_status:
context: "Heartbeat: MacOS Unit Tests"

- label: ":mac: Heartbeat MacOS ARM Unit Tests"
key: "macos-arm-extended"
command: |
set -euo pipefail
source .buildkite/scripts/install_macos_tools.sh
cd heartbeat
mage build unitTest
agents:
provider: "orka"
imagePrefix: "${IMAGE_MACOS_ARM}"
artifact_paths:
- "metricbeat/build/*.xml"
- "metricbeat/build/*.json"
notify:
- github_commit_status:
context: "Heartbeat: MacOS ARM Unit Tests"

- group: "Heartbeat Windows Extended Testing"
key: "heartbeat-extended-tests-win"
Expand All @@ -151,6 +196,9 @@ steps:
artifact_paths:
- "heartbeat/build/*.xml"
- "heartbeat/build/*.json"
notify:
- github_commit_status:
context: "Heartbeat: Win-2019 Unit Tests"

- label: ":windows: Heartbeat Win-11 Unit Tests"
key: "heartbeat-windows-extended-11"
Expand All @@ -165,6 +213,9 @@ steps:
artifact_paths:
- "heartbeat/build/*.xml"
- "heartbeat/build/*.json"
notify:
- github_commit_status:
context: "Heartbeat: Win-11 Unit Tests"

- label: ":windows: Heartbeat Win-10 Unit Tests"
key: "heartbeat-windows-extended-10"
Expand All @@ -179,6 +230,9 @@ steps:
artifact_paths:
- "heartbeat/build/*.xml"
- "heartbeat/build/*.json"
notify:
- github_commit_status:
context: "Heartbeat: Win-10 Unit Tests"

- wait: ~
if: build.env("BUILDKITE_PULL_REQUEST") != "false"
Expand Down
3 changes: 2 additions & 1 deletion .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PRIVATE_CI_GCS_CREDENTIALS_PATH="kv/ci-shared/platform-ingest/gcp-platform-inges
DOCKER_REGISTRY_SECRET_PATH="kv/ci-shared/platform-ingest/docker_registry_prod"
GITHUB_TOKEN_VAULT_PATH="kv/ci-shared/platform-ingest/github_token"

if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats" || "$BUILDKITE_PIPELINE_SLUG" == "filebeat" || "$BUILDKITE_PIPELINE_SLUG" == "auditbeat" || "$BUILDKITE_PIPELINE_SLUG" == "heartbeat" ]]; then
if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats" || "$BUILDKITE_PIPELINE_SLUG" == "filebeat" || "$BUILDKITE_PIPELINE_SLUG" == "auditbeat" ]]; then
source .buildkite/env-scripts/env.sh
if [[ -z "${GO_VERSION-""}" ]]; then
export GO_VERSION=$(cat "${WORKSPACE}/.go-version")
Expand Down Expand Up @@ -56,6 +56,7 @@ fi

ENABLED_BEATS_PIPELINES_SLUGS=(
"auditbeat"
"heartbeat"
"filebeat"
"beats-metricbeat"
"beats-packetbeat"
Expand Down
9 changes: 5 additions & 4 deletions .buildkite/hooks/scripts/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ google_cloud_logout_active_account() {
}

cleanup() {
# TODO: disable for upload pipeline
if [[ "$BUILDKITE_COMMAND" != *"buildkite-agent pipeline upload"* ]]; then
echo "Deleting temporary files..."
if [[ -e "${BIN}/${TMP_FOLDER}" ]]; then
rm -rf "${BIN}/${TMP_FOLDER}.*"
if [[ -e "${BIN}/${TMP_FOLDER}" ]]; then
rm -rf "${BIN}/${TMP_FOLDER}.*"
fi
echo "Done."
fi
echo "Done."
}

0 comments on commit d41b2ba

Please sign in to comment.