Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

    r5a11e07 rcb2e8ce  
    1414                          name: 'buildArchitecture',                    \
    1515                          value: arch]                                  \
    16                 ],                                                              \
    17                 propagate: false
     16                ]
    1817
    1918        echo(result.result)
    20 
    21         if(result.result != 'SUCCESS') {
    22                 sh("wget -q -O - ${result.absoluteUrl}/consoleText")
    23                 error(result.result)
    24         }
     19        echo(result.absoluteUrl)
    2520}
    2621
     
    3732                checkout scm
    3833
    39                 collect_git_info()
    40 
    4134                //parse git logs to find what changed
    4235                sh "git remote > ${out_dir}/GIT_REMOTE"
     
    4841                }
    4942
    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
    55 def 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]
     43                sh "git push DoLang ${gitRefNewValue}:master"
    6844}
    6945
     
    7349
    7450node ('master') {
    75         def err = null
    76 
    7751        try {
    7852                //Prevent the build from exceeding 30 minutes
     
    10478        //attach the build log to the email
    10579        catch (Exception caughtError) {
    106                 echo('error caught')
    107 
    10880                //rethrow error later
    10981                err = caughtError
    11082
    11183                //Store the result of the build log
    112                 currentBuild.result = 'FAILURE'
     84                currentBuild.result = "${status_prefix} FAILURE".trim()
    11385
    11486                //Send email to notify the failure
    115                 promote_failure_email()
     87                promote_email(currentBuild.result)
    11688        }
    11789
     
    128100
    129101//Email notification on a full build failure
    130 def promote_failure_email() {
    131         echo('notifying users')
    132 
     102def promote_email(String status) {
    133103        //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
    134104        //Configurations for email format
     
    143113- Status --------------------------------------------------------------
    144114
    145 PROMOTE FAILURE
     115PROMOTE FAILURE - ${status}
    146116"""
    147117
Note: See TracChangeset for help on using the changeset viewer.