Skip to content

Commit cf86e16

Browse files
authored
Merge pull request #42 from cloudogu/feature/docker-run-args
Add support for additional docker run args
2 parents c1804f0 + 36a8031 commit cf86e16

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Added
11+
- Add additional docker runs args support
1112
- Add welcome message and print configs at application start
1213

1314
### Changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,10 @@ def gitopsConfig = [
383383
]
384384
```
385385

386+
If you should need to add addition arguments to `docker run` you can do so globally by setting
387+
`ADDITIONAL_DOCKER_RUN_ARGS` as global properties at `https://your-jenkins/manage/configure#global-properties`.
388+
This can be used to globally fix certain bugs in Jenkins agents or their docker config.
389+
386390
## Stages
387391
The GitOps-build-lib supports builds on multiple stages. A stage is defined by a name and contains a namespace (used to
388392
generate the resources) and a deployment-flag:

src/com/cloudogu/gitopsbuildlib/docker/DockerWrapper.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class DockerWrapper {
3434
script.docker.image(image).inside(
3535
// Allow accessing WORKSPACE even when we are in a child dir (using "dir() {}")
3636
"${script.pwd().equals(script.env.WORKSPACE) ? '' : "-v ${script.env.WORKSPACE}:${script.env.WORKSPACE} "}" +
37+
"${script.env.ADDITIONAL_DOCKER_RUN_ARGS ? " ${script.env.ADDITIONAL_DOCKER_RUN_ARGS} " : ''}" +
3738
// Avoid: "ERROR: The container started but didn't run the expected command"
3839
'--entrypoint=""'
3940
) {

0 commit comments

Comments
 (0)