An error occurred while fetching this tab.
WIP: Provide initial support for windows in docker executor
There are no commits yet
Push commits to the source branch or add previously merged commits to review them.
Do not update/delete: Banner broadcast message test data
Do not update/delete: Notification broadcast message test data
The docker executor has been updated to provide initial support for docker containers on windows. The executor works, but has some limitations:
getPrebuiltImage()
on windows is different from linux. If the image does not exist locally, it will try to pull from remote. Since the current name does not point to a public repository, this will always fail.getPrebuiltImage()
so that it does: 1) Looks for image locally, 2) Tries to extract from bindata (linux only), 3) Pulls from public repository (linux and windows)helper_image
option has been added to the docker executor config options. This allows someone configuring the runner to point to a different helper image (it looks locally then tries to pull the specified image). This works on both linux and windows. The intention of this is to provide a publically available helper image for windows, so that users do not need to build the image from source or pull and retag into the standard helper image name. The behavior of this command is to look for the specified image locally and then try to pull from remote repository.consts_windows.go
file has been created to set the required API to 1.24 on windows, while leaving it at 1.18 for other platforms.git clone
-type commands due to this. As a workaround, when the docker
executor is used on windows, then internally it calls git clone
-type commands and clones into a temporary directory. The files are then moved into the mapped volume. There is no user impact to this, it just required us to implement workarounds in shells/abstract.go
. These workarounds are windows-only.Get-Credential
), where it will not be handled properly. The ideal scenario would be for the -NonInteractive
switch invoking powershell.exe to work when sending commands (right now, it appears to be ignored if not also using -File
or -Command
) - this would solve both the stdout problem and the interaction problem.Various fixes related to handling docker for windows have also been implemented. Where they may be impactful, they've been wrapped in a conditional check (runtime.GOOS == "windows"
).
We have performed manual testing of the executor on both windows and linux. Unit tests for the docker executor continue to pass. We've had some initial discussions about implementing windows-specific tests into the gitlab-ci.yml
file, but have not yet done so.
We have added a script (make-windows-container.ps1
in the root of the repo) that will build the prebuilt container. Right now, due to the limitations above, this needs to be done on the runner machine (which requires the gitlab runner source code), which is not ideal. To avoid this, in the runner TOML in the docker section, you can specify helper_image
and point to our publically available image: cdhunt/gitlab-runner-helper:winx86_64-latest
.
Push commits to the source branch or add previously merged commits to review them.