Added setEnv function
This commit is contained in:
parent
453cf79a8d
commit
4f7aaca9d6
|
@ -1,8 +1,6 @@
|
|||
#!/usr/bin/env groovy
|
||||
|
||||
sh 'printenv'
|
||||
|
||||
def sendEmail() {
|
||||
def setEnv() {
|
||||
if (!env.GIT_COMMITTER_EMAIL) {
|
||||
env.COMMITTER_EMAIL = sh(
|
||||
script: 'git --no-pager show -s --format="%ae"',
|
||||
|
@ -12,6 +10,10 @@ def sendEmail() {
|
|||
env.COMMITTER_EMAIL = env.GIT_COMMITTER_EMAIL;
|
||||
}
|
||||
|
||||
sh 'printenv'
|
||||
}
|
||||
|
||||
def sendEmail() {
|
||||
if (!env.COMMITTER_EMAIL) return
|
||||
try {
|
||||
mail(
|
||||
|
|
Loading…
Reference in New Issue