Windows Container Executor MVC
This epic tracks overall delivery of the first version of a supported Windows Docker executor for the GitLab Runner. A second epic (https://gitlab.com/groups/gitlab-org/-/epics/821) provides the long term vision and follow-up items from this MVC.
### Problem Statement
GitLab CI/CD provides a powerful, Docker first approach to continuous integration. This approach has allowed GitLab to obtain high marks from analysts and users alike in regards to the ability to create and run builds in transient environments. However, up until this point, the focus of the [Docker executor](https://docs.gitlab.com/runner/executors/docker.html) has been almost entirely on Linux based systems.
While the GitLab Runner is multi-platform and does support [Windows based builds](https://docs.gitlab.com/runner/install/windows.html), the differences between Docker for Windows and Docker for Unix/Linux are significant enough that our current Docker executor cannot be used to create ephemeral Docker-based builds for Windows environments. More and more of our customers are using Windows, and are not satisfied with using the shell executor to orchestrate Docker commands to run their deployments. They need a container-executor with first class support for Windows that works just as well as the Unix one.
### Use Cases
In large-scale enterprise environments, builds and CI jobs must be able to be efficient, easy, and secure. Docker provides this ability by efficiently using compute resources and providing several ways to segment various projects from one another.
For example:
* A large [computer data storage company](https://gitlab.my.salesforce.com/00161000013aRjG) who produces software mostly in Windows enterprise environments has a need to scale their build infrastructure in an elastic, easy to maintain and secure way.
* A [product lifecycle management](https://gitlab.my.salesforce.com/00161000006g08Q?sdtd=1) consultancy needs to run segmented Windows builds for various unrelated clients using the same shared infrastructure.
### Proposal
Provide first class support for Windows as a Docker executor platform. Ensure that the basic functions of the Docker executor are scalable and available to folks using either Linux/Unix or Windows as their host system.
Generally, this will involve:
* Adding a `docker-windows` executor that users can select as an executor type for their gitlab-runner configuration
* Adding and publishing the correct [helper images](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#helper-image) to support various versions of Windows that are compltable with Docker. This is required as Docker for Windows requires that the host and guest kernel be the same.
* Extracting and generalizing code surrounding the Docker executor for platform-specific items such as directory structure, volume mounts, and other items so that they can work cross-platform.
More details on the specifics of the engineering effort can be found in the Implementation Plan and issues below.
### Implementation Plan
The engineering team identified the following changes as being required to deliver the native Windows container-executor:
1. https://gitlab.com/gitlab-org/gitlab-runner/issues/3488 updates Docker API to compatible version (requires https://gitlab.com/gitlab-org/gitlab-ce/issues/56478 to deprecate CentOS 6 support since the Windows-compatible Docker library no longer supports it.)
1. https://gitlab.com/gitlab-org/gitlab-runner/issues/3757 gets tests working on Windows CI in a reliable Windows host. First run is unreliable and does not run full suite; the second run never completes.
1. https://gitlab.com/gitlab-org/gitlab-runner/issues/2609 needs to be completed (https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/706 has already submitted ~"Community contribution" that requires completion.)
1. https://gitlab.com/gitlab-org/gitlab-runner/issues/3755 delivers a helper image for Windows execution.
### Things not considered for the MVC
Please check the follow-up epic for this https://gitlab.com/groups/gitlab-org/-/epics/821.
epic