Skip to content

Create separate helper image with Powershell Core

Pedro Pombeiro requested to merge 4021-generate-pwsh-image into master

What does this MR do?

This MR creates a Linux helper image with Powershell Core. A follow-up MR (!2563 (merged)) will add support to the Docker executor to use this image based on the selected shell.

  • It adds Powershell Core to the Alpine helper image (version taken from the PWSH_VERSION environment variable);
  • dockerfiles/runner-helper/Dockerfile was changed to be roughly similar to the official Powershell Core Dockerfile. I didn't just use that as a base because it is not yet published on Docker Hub, and because in the future we might have other technologies we might need to add and we can't have multiple base images anyway. The Dockerfile excerpts were copied verbatim to make it easier to update with future upstream changes;

Why was this MR needed?

See #27252 (closed)

What's the best way to test this MR?

  1. Build the helper image:

    make helper-dockerarchive-host
  2. There should be an additional image built with a pwsh- prefix - out/helper-images/prebuilt-pwsh-x86_64.tar.xz (see job artifacts and log here). It should also have been imported as gitlab/gitlab-runner-helper:pwsh-x86_64-<COMMIT_SHA>.

What are the relevant issue numbers?

Closes #27252 (closed)

Edited by Pedro Pombeiro

Merge request reports