Changeset 13c98a4 for Jenkinsfile


Ignore:
Timestamp:
Apr 24, 2019, 3:14:32 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
3c40dc2a
Parents:
f85464da
Message:

Jenkins emails now use html, this push does some work to improve how they look

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    rf85464da r13c98a4  
    6666        finally {
    6767                //Send email with final results if this is not a full build
    68                 if( Settings && !Settings.Silent ) {
    69                         email(log_needed, Settings.IsSandbox)
    70                 }
     68                email(log_needed)
    7169
    7270                echo 'Build Completed'
     
    200198
    201199        return """
     200<pre>
    202201The branch ${env.BRANCH_NAME} has been updated.
    203202${gitUpdate}
    204 
    205 Check console output at ${env.BUILD_URL} to view the results.
    206 
    207 - Status --------------------------------------------------------------
    208 
    209 BUILD# ${env.BUILD_NUMBER} - ${currentBuild.result}
    210 
    211 - Log -----------------------------------------------------------------
     203</pre>
     204
     205<p>Check console output at ${env.BUILD_URL} to view the results.</p>
     206
     207<p>- Status --------------------------------------------------------------</p>
     208
     209<p>BUILD# ${env.BUILD_NUMBER} - ${currentBuild.result}</p>
     210
     211<p>- Log -----------------------------------------------------------------</p>
     212
     213<pre>
    212214${gitLog}
    213 -----------------------------------------------------------------------
     215</pre>
     216
     217<p>-----------------------------------------------------------------------</p>
     218<pre>
    214219Summary of changes:
    215220${gitDiff}
     221</pre>
    216222"""
    217223}
    218224
    219225//Standard build email notification
    220 def email(boolean log, boolean bIsSandbox) {
     226def email(boolean log) {
    221227        //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
    222228        //Configurations for email format
     
    225231        def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase()
    226232        def email_subject = "[${project_name} git][BUILD# ${env.BUILD_NUMBER} - ${currentBuild.result}] - branch ${env.BRANCH_NAME}"
    227         def email_body = """This is an automated email from the Jenkins build machine. It was
     233        def email_body = """<p>This is an automated email from the Jenkins build machine. It was
    228234generated because of a git hooks/post-receive script following
    229 a ref change which was pushed to the Cforall repository.
     235a ref change which was pushed to the C∀ repository.</p>
    230236""" + GitLogMessage()
    231237
    232         def email_to = "cforall@lists.uwaterloo.ca"
    233 
    234         if( Settings && !Settings.IsSandbox ) {
     238        def email_to = !Settings.IsSandbox ? "cforall@lists.uwaterloo.ca" : "tdelisle@uwaterloo.ca"
     239
     240        if( Settings && !Settings.Silent ) {
    235241                //send email notification
    236242                emailext body: email_body, subject: email_subject, to: email_to, attachLog: log
Note: See TracChangeset for help on using the changeset viewer.