(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

  % gpg --keyserver keys.gnupg.net --recv-key 1426C7DC3F51E16F
------------------------------------------------------

-- 
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/20170517192334.z67kdyaotzh2ogod%40blackberry.coupleofllamas.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: PGP signature

Reply via email to