Skip to content

Fix Windows runner helper docker container

What does this MR do?

  • Removes a recursive default include path from the system git config.
  • Removes the use of Start-Process. This was presumably used to create a shell with the newly set environment variables. However, it appears doing this has swallowed the git config error.

Why was this MR needed?

The git version we've upgraded to, 2.27.0, contains an include that is recursive.

MinGit, the install of git we use, is not recommended to be installed to Program Files\git (https://github.com/git-for-windows/git/issues/2387#issuecomment-549787688).

The recommended fix is to either change installation location or unset the included paths. Eventually, we may want to consider changing path.

What's the best way to test this MR?

docker build -t win -f .\dockerfiles\runner-helper\Dockerfile.x86_64_servercore .\dockerfiles\runner-helper\ --build-arg BASE_IMAGE_TAG=mcr.microsoft.com/windows/servercore:1909-amd64 --build-arg GIT_VERSION=2.27.0 --build-arg GIT_VERSION_BUILD=1 --build-arg GIT_LFS_VERSION=2.11.0  --build-arg GIT_256_CHECKSUM=bdb8c1560eca39f4d99b07705006c00d94a3f8612501046a0f89353afc5307fa --build-arg GIT_LFS_256_CHECKSUM=ca05b0b9bd39d99665045776a5d0d5c7bfa2605a6118c2f489bfd40c2c3e4f2c

docker run -it win:latest powershell.exe

# no error running git config means we're good
git config user.name

What are the relevant issue numbers?

Closes gitlab#239013 (closed)

Edited by Arran Walker

Merge request reports