Added setEnv function

This commit is contained in:
Juan Ferrer 2020-01-30 16:19:09 +01:00
parent 453cf79a8d
commit 4f7aaca9d6
1 changed files with 5 additions and 3 deletions

View File

@ -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(