Re: Windows Master and Linux Slave give an error: Cannot run program "C:\Windows\system32\cmd.exe"

2019-05-20 Thread Bob TheBuilder
Hi Gregory, what kind of Jenkinsfile do you use? Scripted or declarative? In scripted, you would enclose your sh in a > node('linux_label') { > sh "your shell script" > } , on declarative, use stage ("Run on Linux only") { agent { label "linux_label" } steps { script { sh "you s

Issue porting scripted to declarative withEnv{} to environment{}

2019-05-14 Thread Bob TheBuilder
Hi, I'm porting a scripted pipeline to a declarative one. I used to have something like this: //Scripted def myEnv = [:] stage ('Prepare my env') { [...] myEnv = ... } stage ('Fancy stuff') { node() { withEnv(myEnv} { // here use what is defined in myEnv } }

Issue porting scripted to declarative withEnv{} => environment{}

2019-05-14 Thread Bob TheBuilder
Hi, I have issue porting scripted to declarative pipeline. I used to have in scripted: //Scripted def myEnv = [:] stage ('Prepare my env') { [...] myEnv = ... } stage ('Fancy stuff') { node() { withEnv(myEnv} { // here use what is defined in myEnv } } st