How do I get the output of a shell command executed using into a variable from Jenkinsfile (groovy)?
The latest version of the pipeline sh step allows you to do the following; // Git committer email GIT_COMMIT_EMAIL = sh ( script: ‘git –no-pager show -s –format=\’%ae\”, returnStdout: true ).trim() echo “Git committer email: ${GIT_COMMIT_EMAIL}” Another feature is the returnStatus option. // Test commit message for flags BUILD_FULL = sh ( script: “git log … Read more