>
> (replies inline) 
>
> On Wed, 17 May 2017, Bart??omiej Sacharski wrote: 
>
> > Hello. 
> > 
> > I'm trying to mount specific directory to a stage-only agent that will 
> use 
> > docker in a declarative pipeline. 
> > It looks like this: 
> > 
> > > agent { 
> > >   docker { 
> > >     image "myimage:latest" 
> > >     args "-v ${WORKSPACE}/out:/var/www/api/out" 
> > >   } 
> > > } 
> > > 
> > 
> > However, this results in *No such property: WORKSPACE*. When I'm using 
> > *env.WORKSPACE* it is interpolated to *null* (also resulting in error). 
> > Does that mean that interpolation is only available for steps, or is 
> there 
> > another trick (without resorting to scripted pipeline) to interpolate 
> > string properly in this case? 
>
>
>
> I believe interpolationg may work here, but I doubt the workspace or env 
> would 
> be available since those are heavily agent-dependent. Basically this would 
> be 
> referencing a variable before it has been created. 
>
> - R. Tyler Croy 
>
> ------------------------------------------------------ 
>      Code: <https://github.com/rtyler> 
>   Chatter: <https://twitter.com/agentdero> 
>      xmpp: rty...@jabber.org <javascript:> 
>
>   % gpg --keyserver keys.gnupg.net --recv-key 1426C7DC3F51E16F 
> ------------------------------------------------------ 
>
 
Since this is an stage-only agent, would it be possible to define a new 
variable with that value on a pipeline level, or in previous stages, before 
there is a need to interpolate it for docker agent?

-- 
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/09f0f376-021c-4567-912e-68b15f84cd78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to