Changeset e8a22a7


Ignore:
Timestamp:
May 30, 2016, 10:40:46 AM (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:
ed091cd
Parents:
d37fc7b
Message:

testing email notification for jenkins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    rd37fc7b re8a22a7  
    1313        //configure the conpilation
    1414        try {
     15                sh 'git clean -dfq'
    1516                sh 'make maintainer-clean > /dev/null'
    16                 sh 'CC=gcc-4.9 CXX=g++-4.9 ./configure'
    17                 sh 'dfgdfg make -j 8'
    18                 echo "Success"
     17                sh 'CC=gcc-4.9 CXX=g++-4.9 ./configure > /dev/null'
     18                sh 'dfsdfs make -j 8'
     19                email("SUCCESS")
    1920        } catch (Exception e) {
    20                 echo "Failed"
     21                email("SUCCESS")
     22                throw e;
    2123        }
    2224}
    2325
    24 // stage 'Notify'
    25 // node {
    26 //      //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
    27 //      //Configurations for email format
    28 //      def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase()
    29 //
    30 //      def email_subject = "[${project_name} git] - branch ${env.BRANCH_NAME} - Build # ${env.BUILD_NUMBER} - BUILD_STATUS!"
    31 //      def email_body = """This is an automated email from the Jenkins build machine. It was
    32 //      generated because of a git hooks/post-receive script following
    33 //      a ref change was pushed to the repository containing
    34 //      the project "UNNAMED PROJECT".
    35 //
    36 //      The branch ${env.BRANCH_NAME} has been updated
    37 //             via  GIT_COMMIT (commit)
    38 //            from  GIT_PREVIOUS_COMMIT (commit)
    39 //
    40 //      Those revisions listed above that are new to this repository have
    41 //      not appeared on any other notification email; so we list those
    42 //      revisions in full, below.
    43 //
    44 //      Check console output at ${env.BUILD_URL} to view the results."""
    45 //
    46 //      def email_to = 'tdelisle@uwaterloo.ca'
    47 //
    48 //      //send email notification
    49 //      emailext body: email_body, subject: email_subject, to: email_to, attachLog: true
    50 // }
     26def email(String status) {
     27        //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
     28        //Configurations for email format
     29        def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase()
     30
     31        def email_subject = "[${project_name} git] - branch ${env.BRANCH_NAME} - Build # ${env.BUILD_NUMBER} - ${status}!"
     32        def email_body = """This is an automated email from the Jenkins build machine. It was
     33        generated because of a git hooks/post-receive script following
     34        a ref change was pushed to the repository containing
     35        the project "UNNAMED PROJECT".
     36
     37        The branch ${env.BRANCH_NAME} has been updated
     38               via  GIT_COMMIT (commit)
     39              from  GIT_PREVIOUS_COMMIT (commit)
     40
     41        Those revisions listed above that are new to this repository have
     42        not appeared on any other notification email; so we list those
     43        revisions in full, below.
     44
     45        Check console output at ${env.BUILD_URL} to view the results."""
     46
     47        def email_to = 'tdelisle@uwaterloo.ca'
     48
     49        //send email notification
     50        emailext body: email_body, subject: email_subject, to: email_to, attachLog: true
     51}
Note: See TracChangeset for help on using the changeset viewer.