-
Bug
-
Resolution: Unresolved
-
Minor
-
None
Currently I need to use multiple docker containers which need to be linked together.
I tried using the --link option to set the linked image. In my use-case I don't want to set a fixed name but need to use a variable for the name.
In this case the args parameter is evaluated to "--link null:linkedimage" and the job fails.
Or is there another way to pass dynamic parameters (from variables) to the docker args?
pipeline { agent any environment { LINK_DOCKER_IMAGE = "linkedimage" } stages { stage ('Compose') { agent { docker { image 'alpine' args "--link ${env.LINK_DOCKER_IMAGE}:linkedimage" } } steps { sh 'printenv' } } } }
[JENKINS-42369] agent docker parameters do not honor the current environment
Epic Link |
New:
|
Rank | New: Ranked higher |
Rank | New: Ranked lower |
Comment |
[ Hi ! This bug is very troubelsome for us and the workarounds does not work in all cases... and are workarounds ;) Would it be possible to change the priority to accelerate the fix please ? ] |
I came across the same issue and was able to work around it by defining variable outside the pipeline.