Enable PowerShell Core support in Docker Executor on Linux
What does this MR do?
This MR builds on !2641 (merged) and adds support for Powershell Core (
pwsh shell) to the
docker executor (it already was supported on the
It adds some tests for the
Powershell shell which were missing so that we now can test some of the added functionality (like the
Why was this MR needed?
See #4021 (closed)
What's the best way to test this MR?
Build the helper image and the runner:
make helper-dockerarchive-host runner-bin-host
Register a runner (define $YOUR_TOKEN):
gitlab-runner register --non-interactive \ --executor "docker" \ --shell "pwsh" \ --docker-image "mcr.microsoft.com/powershell:preview-alpine-3.11" \ --url "https://gitlab.com/" \ --description "pwsh-docker-runner" \ --tag-list "pwsh,docker" \ --locked="false" \ --access-level="not_protected" \ --registration-token="$YOUR_TOKEN"
Create a project with the following job (example):
start_evaluation: script: - Write-Output $PSVersionTable tags: - docker - pwsh
Start the runner: