Changeset f2b977a for Jenkinsfile


Ignore:
Timestamp:
May 27, 2016, 4:57:30 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
d42fa1f
Parents:
018fac4
Message:

now using token expander for email notification in jenkinsfile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    r018fac4 rf2b977a  
    11
    22//Configurations for email format
    3 def email_subject = '[$PROJECT_NAME git] - branch $GIT_BRANCH - Build # $BUILD_NUMBER - $BUILD_STATUS!'
    4 def email_body = '''This is an automated email from the Jenkins build machine. It was
     3def email_subject_template = '[$PROJECT_NAME git] - branch $GIT_BRANCH - Build # $BUILD_NUMBER - $BUILD_STATUS!'
     4def email_body_template = '''This is an automated email from the Jenkins build machine. It was
    55generated because of a git hooks/post-receive script following
    66a ref change was pushed to the repository containing
     
    1818
    1919node ('master'){
    20   stage 'Build'
    21   checkout scm //checkout the source code from source control
    22   sh 'CC=gcc-4.9 CXX=g++-4.9 ./configure'
    23   sh 'make -j 8'
    24   //emailext body: email_body, subject: email_subject, to: ''
    25   emailext body: '$DEFAULT_CONTENT', subject: '$DEFAULT_SUBJECT', to: 'tdelisle@uwaterloo.ca'
     20        stage 'Build'
     21        //clean the repo and checkout the source code
     22        checkout scm
     23
     24        //configure the conpilation
     25        sh 'CC=gcc-4.9 CXX=g++-4.9 ./configure'
     26
     27        //build
     28        sh 'make -j 8'
     29
     30        //send email notification
     31
     32        def email_subject = TokenMacro.expand( build, listener, email_subject_template );
     33        def email_body = TokenMacro.expand( build, listener, email_body_template );
     34        def email_to = 'tdelisle@uwaterloo.ca'
     35
     36        emailext body: email_body, subject: email_subject, to: email_to
    2637 }
Note: See TracChangeset for help on using the changeset viewer.