Code fixes
This commit is contained in:
parent
3a1a37aa09
commit
86c268214a
|
@ -1,13 +1,15 @@
|
|||
#!/usr/bin/env groovy
|
||||
|
||||
def call() {
|
||||
if (!env.GIT_COMMITTER_EMAIL) {
|
||||
env.COMMITTER_EMAIL = sh(
|
||||
script: 'git --no-pager show -s --format="%ae"',
|
||||
returnStdout: true
|
||||
).trim()
|
||||
} else {
|
||||
env.COMMITTER_EMAIL = env.GIT_COMMITTER_EMAIL;
|
||||
script {
|
||||
if (!env.GIT_COMMITTER_EMAIL) {
|
||||
env.COMMITTER_EMAIL = sh(
|
||||
script: 'git --no-pager show -s --format="%ae"',
|
||||
returnStdout: true
|
||||
).trim()
|
||||
} else {
|
||||
env.COMMITTER_EMAIL = env.GIT_COMMITTER_EMAIL;
|
||||
}
|
||||
}
|
||||
|
||||
sh 'printenv'
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
#!/usr/bin/env groovy
|
||||
|
||||
def call() {
|
||||
if (!env.COMMITTER_EMAIL) return
|
||||
try {
|
||||
mail(
|
||||
to: env.COMMITTER_EMAIL,
|
||||
subject: "Pipeline: ${env.JOB_NAME} (${env.BUILD_NUMBER}): ${currentBuild.currentResult}",
|
||||
body: "Check status at ${env.BUILD_URL}"
|
||||
)
|
||||
} catch (e) {
|
||||
echo e.toString()
|
||||
script {
|
||||
if (!env.COMMITTER_EMAIL) return
|
||||
try {
|
||||
mail(
|
||||
to: env.COMMITTER_EMAIL,
|
||||
subject: "Pipeline: ${env.JOB_NAME} (${env.BUILD_NUMBER}): ${currentBuild.currentResult}",
|
||||
body: "Check status at ${env.BUILD_URL}"
|
||||
)
|
||||
} catch (e) {
|
||||
echo e.toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue