I frequently use the VAR = sh(returnStdout: true, script \'./script.sh\').trim() syntax in a declarative Jenkinsfile to set a variable in which I w
VAR = sh(returnStdout: true, script \'./script.sh\').trim()
Jenkinsfile