1.mail
As an example of loading variable values from Groovy: mail to: 'devops@acme.com', subject: "Job '${JOB_NAME}' (${BUILD_NUMBER}) is waiting for input", body: "Please go to ${BUILD_URL} and verify the build"
2.脚本
env.MYTOOL_VERSION = '1.33' node { sh '/usr/local/mytool-$MYTOOL_VERSION/bin/start' }
http://162.62.53.204/jenkins/pipeline-syntax/globals#env