From 25e819272e50361358bb564cd655d90fc8821b1a Mon Sep 17 00:00:00 2001 From: Ben Moskovitz Date: Tue, 16 May 2023 16:12:31 +1000 Subject: [PATCH] more good powershell --- .buildkite/Dockerfile-test-windows | 4 +++- .buildkite/docker-compose.yml | 1 + .buildkite/steps/tests-windows.ps1 | 6 ++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.buildkite/Dockerfile-test-windows b/.buildkite/Dockerfile-test-windows index e4f60b7e40..e6e51cb9a5 100644 --- a/.buildkite/Dockerfile-test-windows +++ b/.buildkite/Dockerfile-test-windows @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/windows/servercore:ltsc2019 +FROM mcr.microsoft.com/windows:ltsc2019 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -13,3 +13,5 @@ RUN choco feature enable -n allowGlobalConfirmation; # Install Build Tools RUN choco install golang --version 1.20.4; RUN choco install ruby --version 2.7.7.1; +RUN choco install gnuwin32-coreutils.install; +RUN choco install git; diff --git a/.buildkite/docker-compose.yml b/.buildkite/docker-compose.yml index a44363c006..3d0ee0a2e0 100644 --- a/.buildkite/docker-compose.yml +++ b/.buildkite/docker-compose.yml @@ -41,3 +41,4 @@ services: volumes: ruby-2-7-6-agent-gem-cache: ~ + go-mod-cache: diff --git a/.buildkite/steps/tests-windows.ps1 b/.buildkite/steps/tests-windows.ps1 index f3a8f55e26..5311129382 100644 --- a/.buildkite/steps/tests-windows.ps1 +++ b/.buildkite/steps/tests-windows.ps1 @@ -1,9 +1,11 @@ -pwd +$ErrorActionPreference = "Stop" go install "gotest.tools/gotestsum@v1.8.0" echo '+++ Running tests' gotestsum --junitfile "junit-${BUILDKITE_JOB_ID}.xml" -- -count=1 -failfast ./... +If ($lastexitcode -ne 0) { Exit $lastexitcode } echo '+++ Running integration tests for git-mirrors experiment' -TEST_EXPERIMENT=git-mirrors gotestsum --junitfile "junit-${BUILDKITE_JOB_ID}-git-mirrors.xml" -- -count=1 -failfast ./bootstrap/integration +$Env:TEST_EXPERIMENT = "git-mirrors"; gotestsum --junitfile "junit-${BUILDKITE_JOB_ID}-git-mirrors.xml" -- -count=1 -failfast ./bootstrap/integration +If ($lastexitcode -ne 0) { Exit $lastexitcode }