Changeset b067d9b for Jenkins/FullBuild


Ignore:
Timestamp:
Oct 29, 2019, 4:01:24 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
773db65, 9421f3d8
Parents:
7951100 (diff), 8364209 (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

    r7951100 rb067d9b  
    1717
    1818                                parallel (
    19                                         gcc_6_x64: { trigger_build( 'gcc-6',   'x64', true  ) },
    20                                         gcc_6_x86: { trigger_build( 'gcc-6',   'x86', true  ) },
    21                                         gcc_5_x64: { trigger_build( 'gcc-5',   'x64', false ) },
    22                                         gcc_5_x86: { trigger_build( 'gcc-5',   'x86', false ) },
    23                                         gcc_4_x64: { trigger_build( 'gcc-4.9', 'x64', false ) },
    24                                         gcc_4_x86: { trigger_build( 'gcc-4.9', 'x86', false ) },
    25                                         clang_x64: { trigger_build( 'clang',   'x64', false ) },
    26                                         clang_x86: { trigger_build( 'clang',   'x86', false ) },
     19                                        gcc_6_x64: { trigger_build( 'gcc-6',   'x64' ) },
     20                                        gcc_6_x86: { trigger_build( 'gcc-6',   'x86' ) },
     21                                        gcc_5_x64: { trigger_build( 'gcc-5',   'x64' ) },
     22                                        gcc_5_x86: { trigger_build( 'gcc-5',   'x86' ) },
     23                                        clang_x64: { trigger_build( 'clang',   'x64' ) },
     24                                        clang_x86: { trigger_build( 'clang',   'x86' ) },
    2725                                )
    2826                        }
     27                }
    2928
    30                         //Push latest changes to do-lang repo
    31                         push_build()
    32                 }
     29                promote_email(true)
    3330        }
    3431
     
    4542
    4643                //Send email to notify the failure
    47                 promote_failure_email()
     44                promote_email(false)
    4845        }
    4946
     
    5956//===========================================================================================================
    6057
    61 def trigger_build(String cc, String arch, Boolean publish) {
     58def trigger_build(String cc, String arch) {
    6259        def result = build job: 'Cforall/master',               \
    6360                parameters: [                                           \
    6461                        [$class: 'StringParameterValue',                \
    65                           name: 'pCompiler',                            \
     62                          name: 'Compiler',                             \
    6663                          value: cc],                                   \
    6764                        [$class: 'StringParameterValue',                \
    68                           name: 'pArchitecture',                        \
     65                          name: 'Architecture',                         \
    6966                          value: arch],                                 \
    7067                        [$class: 'BooleanParameterValue',               \
    71                           name: 'pRunAllTests',                         \
     68                          name: 'RunAllTests',                          \
    7269                          value: true],                                         \
    7370                        [$class: 'BooleanParameterValue',               \
    74                           name: 'pRunBenchmark',                        \
     71                          name: 'RunBenchmark',                         \
    7572                          value: true],                                         \
    7673                        [$class: 'BooleanParameterValue',               \
    77                           name: 'pBuildDocumentation',          \
     74                          name: 'BuildDocumentation',           \
    7875                          value: true],                                         \
    7976                        [$class: 'BooleanParameterValue',               \
    80                           name: 'pPublish',                             \
    81                           value: publish],                                      \
     77                          name: 'Publish',                              \
     78                          value: true],                                 \
    8279                        [$class: 'BooleanParameterValue',               \
    83                           name: 'pSilent',                              \
     80                          name: 'Silent',                               \
    8481                          value: true],                                         \
    8582                ],                                                              \
     
    8986
    9087        if(result.result != 'SUCCESS') {
    91                 sh("wget -q -O - ${result.absoluteUrl}/consoleText")
     88                sh("wget -q -O - http://localhost:8084/jenkins/job/Cforall/job/master/${result.number}/consoleText")
    9289                error(result.result)
    93         }
    94 }
    95 
    96 def push_build() {
    97         //Don't use the build_stage function which outputs the compiler
    98         stage('Push') {
    99 
    100                 status_prefix = 'Push'
    101 
    102                 def out_dir = pwd tmp: true
    103                 sh "mkdir -p ${out_dir}"
    104 
    105                 //checkout the code to make sure this is a valid git repo
    106                 checkout scm
    107 
    108                 collect_git_info()
    109 
    110                 //parse git logs to find what changed
    111                 sh "git remote > ${out_dir}/GIT_REMOTE"
    112                 git_remote = readFile("${out_dir}/GIT_REMOTE")
    113                 remoteDoLangExists = git_remote.contains("DoLang")
    114 
    115                 if( !remoteDoLangExists ) {
    116                         sh 'git remote add DoLang git@gitlab.do-lang.org:internal/cfa-cc.git'
    117                 }
    118 
    119                 //sh "GIT_SSH_COMMAND=\"ssh -v\" git push DoLang ${gitRefNewValue}:master"
    120                 echo('BUILD NOT PUSH SINCE DO-LANG SERVER WAS DOWN')
    12190        }
    12291}
     
    143112
    144113//Email notification on a full build failure
    145 def promote_failure_email() {
     114def promote_email(boolean success) {
    146115        echo('notifying users')
     116
     117        def result = success ? "PROMOTE - SUCCESS" : "PROMOTE - FAILURE"
    147118
    148119        //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
    149120        //Configurations for email format
    150         def email_subject = "[cforall git][PROMOTE - FAILURE]"
    151         def email_body = """This is an automated email from the Jenkins build machine. It was
    152 generated because of a git hooks/post-receive script following
    153 a ref change was pushed to the repository containing
    154 the project "UNNAMED PROJECT".
     121        def email_subject = "[cforall git][${result}]"
     122        def email_body = """<p>This is an automated email from the Jenkins build machine. It was
     123generated following the result of the C\u2200 nightly build.</p>
    155124
    156 Check console output at ${env.BUILD_URL} to view the results.
     125<p>Check console output at ${env.BUILD_URL} to view the results.</p>
    157126
    158 - Status --------------------------------------------------------------
     127<p>- Status --------------------------------------------------------------</p>
    159128
    160 PROMOTE FAILURE
     129<p>${result}</p>
     130
     131<p>- Performance ---------------------------------------------------------</p>
     132
     133<img src="https://cforall.uwaterloo.ca/jenkins/job/Cforall/job/master/plot/Compilation/getPlot?index=0" >
     134<img src="https://cforall.uwaterloo.ca/jenkins/job/Cforall/job/master/plot/Compilation/getPlot?index=1" >
     135
     136<p>- Logs ----------------------------------------------------------------</p>
    161137"""
    162138
     
    164140
    165141        //send email notification
    166         emailext body: email_body, subject: email_subject, to: email_to, attachLog: true
     142        emailext body: email_body, subject: email_subject, to: email_to, attachLog: !success
    167143}
Note: See TracChangeset for help on using the changeset viewer.