I am trying to create a Jenkins pipeline where I need to execute multiple shell commands and use the result of one command in the next command or so. I found that wrapping t
I split the commands with &&
node { FOO = world stage('Preparation') { // for display purposes sh "ls -a && pwd && echo ${FOO}" } }
The example outputs: - ls -a (the files in your workspace - pwd (location workspace) - echo world