Hi, To enable String interpolation, you need to use double quotes instead of simple quotes, otherwise variables are not resolved.
Cheers 2017-10-06 7:53 GMT+02:00 Eric Tan <erictan...@gmail.com>: > Hi > > Is there a way to use parameters in the agent docker section like: > > pipeline { > > parameters { > > string(name: 'OS_PORT', defaultValue: '8888') > > string(name: 'CONTAINER_PORT', defaultValue: '8888') > > } > > agent { > > docker { > > image 'someimage' > > // args '-p 8888:8888' > > args '-p ${params.OS_PORT}:${params.CONTAINER_PORT}' > > } > > } > > > } > > > It does not work above. > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/5c63e393-3da6-49a4-ad99-7e9814bbe828%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/5c63e393-3da6-49a4-ad99-7e9814bbe828%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPO77c05jmUuNEtxy%2BcfXHUpbmUOfpZz5eD3bHBg%2B%2Bhmjo1F4w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.