-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: pipeline-model-definition-plugin
-
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'
}
}
}
}