fixes #4355
gitea/vn-asterisk/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2022-10-15 14:29:05 +02:00
parent 3ece72feec
commit aa96214cf3
1 changed files with 4 additions and 24 deletions

26
Jenkinsfile vendored
View File

@ -15,7 +15,7 @@ pipeline {
stages {
stage('Checkout') {
steps {
sh 'printenv'
setEnv()
}
}
stage('Deploy') {
@ -29,28 +29,8 @@ pipeline {
}
}
post {
always {
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;
}
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()
}
}
unsuccessful {
sendEmail()
}
}
}