Skip to content

Commit

Permalink
Propagate exit code on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
pazone committed Oct 17, 2023
1 parent e994b1a commit 77779b2
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 40 deletions.
80 changes: 40 additions & 40 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@ env:
VAULT_PATH: "kv/ci-shared/observability-ingest/cloud/gcp"
DOCKER_REGISTRY: "docker.elastic.co"
steps:
# - label: "Unit tests - Ubuntu 22.04"
# key: "unit-tests-2204"
# command: ".buildkite/scripts/steps/unit-tests.sh"
# artifact_paths:
# - "build/TEST-**"
# - "build/diagnostics/*"
# agents:
# provider: "gcp"
# image: "family/core-ubuntu-2204"
# retry:
# manual:
# allowed: true
- label: "Unit tests - Ubuntu 22.04"
key: "unit-tests-2204"
command: ".buildkite/scripts/steps/unit-tests.sh"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
agents:
provider: "gcp"
image: "family/core-ubuntu-2204"
retry:
manual:
allowed: true

# - label: "Unit tests - Ubuntu 22.04 ARM64"
# key: "unit-tests-2204-arm64"
# command: ".buildkite/scripts/steps/unit-tests.sh"
# artifact_paths:
# - "build/TEST-**"
# - "build/diagnostics/*"
# agents:
# provider: "aws"
# imagePrefix: "core-ubuntu-2204-aarch64"
# diskSizeGb: 200
# instanceType: "m6g.4xlarge"
# retry:
# manual:
# allowed: true
- label: "Unit tests - Ubuntu 22.04 ARM64"
key: "unit-tests-2204-arm64"
command: ".buildkite/scripts/steps/unit-tests.sh"
artifact_paths:
- "build/TEST-**"
- "build/diagnostics/*"
agents:
provider: "aws"
imagePrefix: "core-ubuntu-2204-aarch64"
diskSizeGb: 200
instanceType: "m6g.4xlarge"
retry:
manual:
allowed: true

- label: "Unit tests - Windows 2022"
key: "unit-tests-win2022"
Expand Down Expand Up @@ -64,20 +64,20 @@ steps:
manual:
allowed: true

# - label: ":sonarqube: Continuous Code Inspection"
# env:
# VAULT_SONAR_TOKEN_PATH: "kv/ci-shared/platform-ingest/elastic/elastic-agent/sonar-analyze-token"
# agents:
# image: "docker.elastic.co/cloud-ci/sonarqube/buildkite-scanner:latest"
# command:
# - "buildkite-agent artifact download build/TEST-go-unit.cov ."
# - "buildkite-agent artifact download build/TEST-go-unit.out.json ."
# - "/scan-source-code.sh"
# depends_on:
# - "unit-tests"
# retry:
# manual:
# allowed: true
- label: ":sonarqube: Continuous Code Inspection"
env:
VAULT_SONAR_TOKEN_PATH: "kv/ci-shared/platform-ingest/elastic/elastic-agent/sonar-analyze-token"
agents:
image: "docker.elastic.co/cloud-ci/sonarqube/buildkite-scanner:latest"
command:
- "buildkite-agent artifact download build/TEST-go-unit.cov ."
- "buildkite-agent artifact download build/TEST-go-unit.out.json ."
- "/scan-source-code.sh"
depends_on:
- "unit-tests"
retry:
manual:
allowed: true

# - label: "Integration tests"
# key: "integration-tests"
Expand Down
8 changes: 8 additions & 0 deletions .buildkite/scripts/steps/unit-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ $ErrorActionPreference = "Stop"
Write-Host "--- Build"
mage build

if ($LASTEXITCODE -ne 0) {
exit 1
}

Write-Host "--- Unit tests"
$env:TEST_COVERAGE = $true
mage unitTest

if ($LASTEXITCODE -ne 0) {
exit 1
}

0 comments on commit 77779b2

Please sign in to comment.