Skip to content

Commit

Permalink
updated win unti test command
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed Mar 25, 2024
1 parent 29abb2c commit a1a2436
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
13 changes: 8 additions & 5 deletions .buildkite/auditbeat/auditbeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ steps:
- "auditbeat/build/*.json"

- label: ":windows:-2016 Unit Tests"
command: ".buildkite/scripts/win-tests.ps1"
key: "windows-2016"
command: "mage -d ${BEATS_PROJECT_NAME} build unitTest"
# command: ".buildkite/scripts/win-tests.ps1"
notify:
- github_commit_status:
context: "Auditbeat: windows-2016/Unit Tests"
Expand All @@ -65,6 +67,7 @@ steps:
- "auditbeat/build/*.json"

- label: ":windows:-2022 Unit Tests"
key: "windows-2022"
command: ".buildkite/scripts/win-tests.ps1"
notify:
- github_commit_status:
Expand Down Expand Up @@ -135,12 +138,12 @@ steps:
artifact_paths: "auditbeat/build/*.xml"

- group: "Windows Extended Testing"
key: "extended-tests-win"
key: "windows-extended-tests"
if: build.env("GITHUB_PR_TRIGGER_COMMENT") == "auditbeat for windows" || build.env("GITHUB_PR_LABELS") =~ /.*windows.*/

steps:
- label: ":windows:-2019 Unit Tests"
key: "win-extended-2019"
key: "windows-extended-2019"
command: ".buildkite/scripts/win-tests.ps1"
notify:
- github_commit_status:
Expand All @@ -156,7 +159,7 @@ steps:
- "auditbeat/build/*.json"

- label: ":windows:-11 Unit Tests"
key: "win-extended-11"
key: "windows-extended-11"
command: ".buildkite/scripts/win-tests.ps1"
notify:
- github_commit_status:
Expand All @@ -172,7 +175,7 @@ steps:
- "auditbeat/build/*.json"

- label: ":windows:-10 Unit Tests"
key: "win-extended-10"
key: "windows-extended-10"
command: ".buildkite/scripts/win-tests.ps1"
notify:
- github_commit_status:
Expand Down
8 changes: 5 additions & 3 deletions .buildkite/filebeat/filebeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ steps:
- "filebeat/build/*.json"

- label: ":windows:-2016 Unit Tests"
key: "windows-2016"
command: ".buildkite/scripts/win-tests.ps1"
notify:
- github_commit_status:
Expand All @@ -80,6 +81,7 @@ steps:
- "filebeat/build/*.json"

- label: ":windows:-2022 Unit Tests"
key: "windows-2022"
command: ".buildkite/scripts/win-tests.ps1"
notify:
- github_commit_status:
Expand Down Expand Up @@ -145,7 +147,7 @@ steps:

steps:
- label: ":windows: Win 2019 Unit Tests"
key: "win-extended-2019"
key: "windows-extended-2019"
command: ".buildkite/scripts/win-tests.ps1"
notify:
- github_commit_status:
Expand All @@ -161,7 +163,7 @@ steps:
- "filebeat/build/*.json"

- label: ":windows:-11 Unit Tests"
key: "win-extended-11"
key: "windows-extended-11"
command: ".buildkite/scripts/win-tests.ps1"
notify:
- github_commit_status:
Expand All @@ -177,7 +179,7 @@ steps:
- "filebeat/build/*.json"

- label: ":windows:-10 Unit Tests"
key: "win-extended-10"
key: "windows-extended-10"
command: ".buildkite/scripts/win-tests.ps1"
notify:
- github_commit_status:
Expand Down
8 changes: 5 additions & 3 deletions .buildkite/heartbeat/heartbeat-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ steps:
- "heartbeat/build/*.json"

- label: ":windows:-2016 Unit Test"
key: "windows-2016"
command:
- ".buildkite/scripts/win-tests.ps1"
notify:
Expand All @@ -67,6 +68,7 @@ steps:
- "heartbeat/build/*.json"

- label: ":windows:-2022 Unit Test"
key: "windows-2022"
command:
- ".buildkite/scripts/win-tests.ps1"
notify:
Expand Down Expand Up @@ -160,7 +162,7 @@ steps:

steps:
- label: ":windows:-2019 Unit Tests"
key: "win-extended-2019"
key: "windows-extended-2019"
command: ".buildkite/scripts/win-tests.ps1"
notify:
- github_commit_status:
Expand All @@ -175,7 +177,7 @@ steps:
- "heartbeat/build/*.json"

- label: ":windows:-11 Unit Tests"
key: "win-extended-11"
key: "windows-extended-11"
command: ".buildkite/scripts/win-tests.ps1"
notify:
- github_commit_status:
Expand All @@ -190,7 +192,7 @@ steps:
- "heartbeat/build/*.json"

- label: ":windows:-10 Unit Tests"
key: "win-extended-10"
key: "windows-extended-10"
command: ".buildkite/scripts/win-tests.ps1"
notify:
- github_commit_status:
Expand Down
8 changes: 7 additions & 1 deletion .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ GITHUB_TOKEN_VAULT_PATH="kv/ci-shared/platform-ingest/github_token"
if [[ "$BUILDKITE_PIPELINE_SLUG" == "filebeat" || "$BUILDKITE_PIPELINE_SLUG" == "auditbeat" || "$BUILDKITE_PIPELINE_SLUG" == "heartbeat" || "$BUILDKITE_PIPELINE_SLUG" == "deploy-k8s" ]]; then
source .buildkite/env-scripts/env.sh

if [[ "$BUILDKITE_STEP_KEY" == windows* ]]; then
git config core.autocrlf false
git rm --quiet --cached -r .
git reset --quiet --hard
fi

if [[ "$BUILDKITE_STEP_KEY" == macos* ]]; then
if [[ -z "${GO_VERSION-""}" ]]; then
GO_VERSION=$(cat "${WORKSPACE}/.go-version")
Expand Down Expand Up @@ -48,7 +54,7 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == "filebeat" || "$BUILDKITE_PIPELINE_SLUG" ==
fi

if [[ "$BUILDKITE_STEP_KEY" == k8s-test* ]]; then
.buildkite/deploy/kubernetes/scripts/setup-k8s-env.sh
.buildkite/deploy/kubernetes/scripts/setup-k8s-env.sh
fi
fi

Expand Down

0 comments on commit a1a2436

Please sign in to comment.