Skip to content

Commit

Permalink
jenkins smtp test openedx#6 - wrap email send in a script
Browse files Browse the repository at this point in the history
  • Loading branch information
lpm0073 committed Apr 27, 2021
1 parent f904775 commit 6cfa125
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,15 @@ pipeline {

always {

// test #6
echo 'Cleaning up Jenkins environment...'
// test #4
def email_subject = "Jenkins build ${BUILD_ID} for commit ${GIT_COMMIT} of branch ${GIT_BRANCH} in repository ${GIT_URL}"

emailext body: 'A Test EMail', recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']], subject: email_subject
steps {
script {
def email_subject = "Jenkins build ${BUILD_ID} for commit ${GIT_COMMIT} of branch ${GIT_BRANCH} in repository ${GIT_URL}"
emailext body: 'A Test EMail', recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']], subject: email_subject
}
}

}

Expand Down

0 comments on commit 6cfa125

Please sign in to comment.