Sorry Stephen, I omitted the agent part (and the rest of the pipeline) for the 
sake of conciseness, to isolate the problem. But the pipeline script is being 
executed on the slave.

More acurate version:

PATH_CI_TOOLS="${env.WORKSPACE}\\tools_ci"

pipeline {
    agent { 
        label 'myslave'
    }
    stages {
        stage('Test'){
            steps{
                bat "${PATH_CI_TOOLS}\\MyProject.exe"
            }
        }
    }
}
Thanks,

Thiago

Em 23/05/2017 05:30:50, Stephen Connolly escreveu:
> The pipeline script is executed on the master. Only when you are within scope 
> of an actual agent node will the workspace have been assigned, so the example 
> you are doing will be expected to return null as you are outside the pipeline 
> {} entirely
> 
> On 22 May 2017 at 07:56, Thiago Carvalho Davila > <> 
> [email protected]> >>  wrote:
> > Hi,
> > 
> > I am trying to get WORKSPACE folder from jenkins global enviroment 
> > variables. The strange thing is I get null on the response:
> > 
> > PATH_CI_TOOLS="${env.> > WORKSPACE}\\tools_ci"
> > pipeline {
> >     stages {
> >         stage('Test'){
> >             steps{
> >                 bat "${PATH_CI_TOOLS}\\MyProject.> > exe"
> >             }
> >         }
> >     }
> > }
> > 
> > 
> > 
> > Return:
> > null\tools_ci\MyProject.exe
The system cannot find the path specified.
> > 
-
> > 
> > 
> > 
"Esta mensagem do SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO), empresa 
pública federal regida pelo disposto na Lei Federal nº 5.615, é enviada 
exclusivamente a seu destinatário e pode conter informações confidenciais, 
protegidas por sigilo profissional. Sua utilização desautorizada é ilegal e 
sujeita o infrator às penas da lei. Se você a recebeu indevidamente, queira, 
por gentileza, reenviá-la ao emitente, esclarecendo o equívoco."
> > 
> > 
"This message from SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO) -- a 
government company established under Brazilian law (5.615/70) -- is directed 
exclusively to its addressee and may contain confidential data, protected under 
professional secrecy rules. Its unauthorized use is illegal and may subject the 
transgressor to the law's penalties. If you're not the addressee, please send 
it back, elucidating the failure."
> > 

> > 

-- 
> > 
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+unsubscribe@> > googlegroups.com> > .
> > 
To view this discussion on the web visit > > https://groups.google.com/d/> > 
msgid/jenkinsci-users/> > 7997bcf2442a04c5248cd939681e37> > 
c4a53b7685%40serpro.gov.br> > .
> > 
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 > [email protected]> .
> 
To view this discussion on the web visit > 
https://groups.google.com/d/msgid/jenkinsci-users/CA%2BnPnMxSeV6sEqDD%3DTxgUMj-Eucr6StNhhiTKMcmr44htvO3rg%40mail.gmail.com>
 .
> 
For more options, visit > https://groups.google.com/d/optout> .



-


"Esta mensagem do SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO), empresa 
pública federal regida pelo disposto na Lei Federal nº 5.615, é enviada 
exclusivamente a seu destinatário e pode conter informações confidenciais, 
protegidas por sigilo profissional. Sua utilização desautorizada é ilegal e 
sujeita o infrator às penas da lei. Se você a recebeu indevidamente, queira, 
por gentileza, reenviá-la ao emitente, esclarecendo o equívoco."

"This message from SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO) -- a 
government company established under Brazilian law (5.615/70) -- is directed 
exclusively to its addressee and may contain confidential data, protected under 
professional secrecy rules. Its unauthorized use is illegal and may subject the 
transgressor to the law's penalties. If you're not the addressee, please send 
it back, elucidating the failure."

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/9fe627116f07323110bb2a816628fe4285db332f%40serpro.gov.br.
For more options, visit https://groups.google.com/d/optout.

Reply via email to