(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
------------------------------------------------------