java-tutorials/jenkins-modules/jenkins-jobs/output-job/pipeline-command-substituti...

14 lines
284 B
Plaintext
Raw Normal View History

pipeline {
agent any
stages {
stage('Example') {
steps {
script {
def output = sh(script: "echo \$(ls)", returnStdout: true)
echo "Output: ${output}"
}
}
}
}
}