Changeset 7527e63 for Jenkins/FullBuild


Ignore:
Timestamp:
Aug 16, 2016, 3:20:06 PM (9 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, 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:
1f6d4624
Parents:
950f7a7 (diff), 7880579 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

    r950f7a7 r7527e63  
    1414                          name: 'buildArchitecture',                    \
    1515                          value: arch]                                  \
    16                 ]
     16                ],                                                              \
     17                propagate: false
    1718
    1819        echo(result.result)
    19         echo(result.absoluteUrl)
     20
     21        if(result.result != 'SUCCESS') {
     22                sh("wget -q -O - ${result.absoluteUrl}/consoleText")
     23                error(result.result)
     24        }
    2025}
    2126
     
    3237                checkout scm
    3338
     39                collect_git_info()
     40
    3441                //parse git logs to find what changed
    3542                sh "git remote > ${out_dir}/GIT_REMOTE"
     
    4148                }
    4249
    43                 sh "git push DoLang ${gitRefNewValue}:master"
     50                //sh "GIT_SSH_COMMAND=\"ssh -v\" git push DoLang ${gitRefNewValue}:master"
     51                echo('BUILD NOT PUSH SINCE DO-LANG SERVER WAS DOWN')
     52}
     53
     54//Helper routine to collect information about the git history
     55def collect_git_info() {
     56
     57        //create the temporary output directory in case it doesn't already exist
     58        def out_dir = pwd tmp: true
     59        sh "mkdir -p ${out_dir}"
     60
     61        //parse git logs to find what changed
     62        dir("../Cforall_Full_Build@script") {
     63                sh "git reflog > ${out_dir}/GIT_COMMIT"
     64        }
     65        git_reflog = readFile("${out_dir}/GIT_COMMIT")
     66        gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1]
     67        gitRefNewValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][2]
    4468}
    4569
     
    4973
    5074node ('master') {
     75        def err = null
     76
    5177        try {
    5278                //Prevent the build from exceeding 30 minutes
     
    78104        //attach the build log to the email
    79105        catch (Exception caughtError) {
     106                echo('error caught')
     107
    80108                //rethrow error later
    81109                err = caughtError
    82110
    83111                //Store the result of the build log
    84                 currentBuild.result = "${status_prefix} FAILURE".trim()
     112                currentBuild.result = 'FAILURE'
    85113
    86114                //Send email to notify the failure
    87                 promote_email(currentBuild.result)
     115                promote_failure_email()
    88116        }
    89117
     
    100128
    101129//Email notification on a full build failure
    102 def promote_email(String status) {
     130def promote_failure_email() {
     131        echo('notifying users')
     132
    103133        //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
    104134        //Configurations for email format
     
    113143- Status --------------------------------------------------------------
    114144
    115 PROMOTE FAILURE - ${status}
     145PROMOTE FAILURE
    116146"""
    117147
Note: See TracChangeset for help on using the changeset viewer.