File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ FROM mcr.microsoft.com/windows/servercore:$WIN_VER
8
8
9
9
ENV chocolateyUseWindowsCompression "true"
10
10
ENV RUST_TOOLCHAIN="1.46.0"
11
+ # Set Chocolatey version to 1.4.0 to avoid .NET Framework 4.8 dependency
12
+ ENV chocolateyVersion="1.4.0"
11
13
12
14
ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
13
15
ADD https://win.rustup.rs/x86_64 C:\TEMP\rustup-init.exe
Original file line number Diff line number Diff line change @@ -34,11 +34,17 @@ function Build-Tag {
34
34
}
35
35
36
36
function Build-Container {
37
+ # Build the container and check for failures
38
+ # Docker build returns 0 on success, non-zero on failure
37
39
$tag = Build-Tag
38
40
docker build - t $tag `
39
- -- build-arg GIT_BRANCH= $GIT_BRANCH `
40
- -- build-arg GIT_COMMIT= $GIT_COMMIT `
41
- -f Dockerfile.windows.x86_64 .
41
+ -- build-arg GIT_BRANCH= $GIT_BRANCH `
42
+ -- build-arg GIT_COMMIT= $GIT_COMMIT `
43
+ -f Dockerfile.windows.x86_64 .
44
+ if ($LASTEXITCODE -ne 0 ) {
45
+ Write-Error " Build failed with exit code $LASTEXITCODE "
46
+ exit $LASTEXITCODE
47
+ }
42
48
Write-Host " Build completed for $tag "
43
49
}
44
50
You can’t perform that action at this time.
0 commit comments