Log choco exit code in windows integration test job

Summary

The .windows integration test job installs zstandard via Chocolatey before running any tests. GitLab Runner's PowerShell shell wrapper exits the job immediately on a non-zero exit code from any script line, with no diagnostic output — so several recent windows integration test jobs have failed silently right after the choco install line, e.g. https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/15181386951: the trace shows a seemingly successful install (hash verified, shim created) and then the job just stops with a generic ERROR: Job failed: exit status 1.

This isn't a fix for the underlying cause (still unknown — possibly a Chocolatey exit-code quirk on an otherwise-successful install), since guessing at which exit code to tolerate risks silently masking a real future failure. Instead, this makes the failure observable: it explicitly checks and logs $LASTEXITCODE after the choco call, while preserving the existing behavior of failing the job on error.

Related: #39583 (closed)

Test plan

  • glab ci lint passes against the modified .gitlab-ci.yml
  • Next occurrence of this failure should show the actual choco exit code in the job log, rather than failing silently

Merge request reports

Loading
Loading