'How to access variable in emailext body part of Jenkins declarative pipeline script?
Please go through the below code once.
How to print the value of the "flag" variable here?
def flag = "UP"
pipeline {
agent {...}
...
stages {
stage{
...
flag = "DOWN"
}
}
post {
always{
echo "sending mail"
emailext body: '''
<h4> flag = ${flag} </h4> // how to print flag value here
'''
mimeType: 'text/html'
...
}
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
