Skip to content

Fix GitLab-Runner symlink in Vagrantfile

Pedro Pombeiro requested to merge 27115-fix-vagrant-symlink into master

What does this MR do?

Fixes the C:\GitLab-Runner symlink by adding a trailing backslash so that docker build doesn't mangle the UNC path with the rest of the context path.

Why was this MR needed?

.\ci\build_release_windows_images.ps1 was failing with the following error:

unable to prepare context: unable to evaluate symlinks in context path: CreateFile \\vboxsvr\C:_GitLab-Runnerdockerfiles: The network name cannot be found.

What's the best way to test this MR?

  1. Recreate the vagrant image with:

    vagrant destroy -f; vagrant up
  2. SSH into the vagrant VM:

    vagrant ssh
  3. Enter a new powershell session.

  4. Build the Windows Docker image:

    cd $Env:RUNNER_SRC
    $Env:CI_REGISTRY_IMAGE="localhost:5000/gitlab"
    $Env:WINDOWS_VERSION = 'servercore1809'
    $Env:GIT_LFS_256_CHECKSUM= "5c12db9728b53cba23e5f58f4a53d88cb2132e82fa1de0f8a79ce9d112e4d396"
    $Env:GIT_256_CHECKSUM= "bd91db55bd95eaa80687df28877e2df8c8858a0266e9c67331cfddba2735f25c"
    $Env:GIT_VERSION= "2.21.0"
    $Env:GIT_VERSION_BUILD= "1"
    $Env:GIT_LFS_VERSION= "2.7.1"
    $Env:PWSH_VERSION= "7.0.1"
    $Env:PWSH_256_CHECKSUM= "e652a8e0f7d088106ea018d4b9e02373d4331907efa64a60dc32e097b165d8fd"
    $Env:SKIP_CLEANUP=1
    .\ci\build_release_windows_images.ps1

The image should finish building successfully.

What are the relevant issue numbers?

Closes #27115 (closed)

Edited by Pedro Pombeiro

Merge request reports

Loading