Re: Running code in Windows agent but script says we are in Linux

2020-02-10 Thread judaondo
Thank you @MarkWaite, I wasn´t aware of that step. And thank you also for the explanation. El lunes, 10 de febrero de 2020, 14:38:30 (UTC+1), Mark Waite escribió: > > Use the isUnix pipeline step >

Re: Running code in Windows agent but script says we are in Linux

2020-02-10 Thread Mark Waite
Use the isUnix pipeline step rather than writing your own version of that step. The System.properties that you are using will execute on the master, not on the agent. When it executes on the

Running code in Windows agent but script says we are in Linux

2020-02-10 Thread judaondo
I have the following pipeline (Jenkinsfile): @Library('mylib@master') import com.mylib.* pipeline { agent { label 'WindowsSlaveWS2016' } stages { stage('Demo') { steps { echo 'a' determineOS() echo 'b'

Running code in Windows agent but script says we are in Linux

2020-02-10 Thread judaondo
I have the following pipeline (Jenkinsfile): @Library('mylib@master') import com.mylib.* pipeline { agent { label 'WindowsSlaveWS2016' } stages { stage('Demo') { steps { echo 'a' determineOS() echo 'b'