Enable Additional Docker Run Arguments #308
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why this pull request ?
This pull request enable Jenkins adminstrator (or users) to add specific arguments to each
docker run
commands issued by the plugin to the underlying Docker Pipeline node.Context
At $daywork, we are migrating from an old DCOS infrastructure, with DIND containers having access to the Docker Socket, to Kubernetes DIND containers (without Docker Socket access).
DCOS DIND containers automatically remount all volumes, including a TLS CA bundle that is provided to the Docker Pipeline Node.
On Kubernetes, the volumes is not found (as there is no volume found for the container exposed through the DIND without a shared socket), so we needed a way to append specific args to each
docker run
command as such :-v /etc/ssl/certs/tls-ca-bundle.pem:/etc/ssl/certs/tls-ca-bundle.pem:ro,z
(The TLS CA bundle is exposed to the DIND container by Kubernetes through a config map).This enable us to migrate our infrastructure without having to ask our numerous users to append an "args: ..." to all of their pipelines' code.
Testing done
Modified current tests to check for Global and Folder config / overrides.
Currently opened to our internal user base in beta befor pushing to our production infrastructure.
Submitter checklist