Changeset 692de479 for Jenkins


Ignore:
Timestamp:
Feb 22, 2017, 5:22:49 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
734891d
Parents:
396ee0a (diff), 8fa3c7e6 (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 'jenkins-sandbox'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

    r396ee0a r692de479  
    11#!groovy
    22
     3//===========================================================================================================
     4// Main loop of the compilation
     5//===========================================================================================================
     6
     7node ('master') {
     8        def err = null
     9
     10        try {
     11                //Prevent the build from exceeding 30 minutes
     12                timeout(60) {
     13
     14                        //Wrap build to add timestamp to command line
     15                        wrap([$class: 'TimestamperBuildWrapper']) {
     16
     17                                stage 'Build'
     18
     19                                        results = [null, null]
     20
     21                                        parallel (
     22                                                gcc_6_x64: { trigger_build( 'gcc-6', 'x64' ) },
     23                                                gcc_6_x86: { trigger_build( 'gcc-6', 'x86' ) },
     24                                                gcc_5_x64: { trigger_build( 'gcc-5', 'x64' ) },
     25                                                gcc_5_x86: { trigger_build( 'gcc-5', 'x86' ) },
     26                                                gcc_4_x64: { trigger_build( 'gcc-4', 'x64' ) },
     27                                                gcc_4_x86: { trigger_build( 'gcc-4', 'x86' ) },
     28                                                clang_x64: { trigger_build( 'clang', 'x64' ) },
     29                                                clang_x86: { trigger_build( 'clang', 'x86' ) },
     30                                        )
     31
     32                                //Push latest changes to do-lang repo
     33                                push_build()
     34                        }
     35                }
     36        }
     37
     38        //If an exception is caught we need to change the status and remember to
     39        //attach the build log to the email
     40        catch (Exception caughtError) {
     41                echo('error caught')
     42
     43                //rethrow error later
     44                err = caughtError
     45
     46                //Store the result of the build log
     47                currentBuild.result = 'FAILURE'
     48
     49                //Send email to notify the failure
     50                promote_failure_email()
     51        }
     52
     53        finally {
     54                //Must re-throw exception to propagate error
     55                if (err) {
     56                        throw err
     57                }
     58        }
     59}
    360//===========================================================================================================
    461// Main compilation routines
    562//===========================================================================================================
    663
    7 def trigger_build(String arch) {
     64def trigger_build(String cc, String arch) {
    865        def result = build job: 'Cforall/master',               \
    966                parameters: [                                           \
     67                        [$class: 'StringParameterValue',                \
     68                          name: 'pCompiler',                            \
     69                          value: cc],                                   \
     70                        [$class: 'StringParameterValue',                \
     71                          name: 'pArchitecture',                        \
     72                          value: arch],                                 \
    1073                        [$class: 'BooleanParameterValue',               \
    11                           name: 'isFullBuild',                          \
     74                          name: 'pRunAllTests',                         \
    1275                          value: true],                                         \
    13                         [$class: 'StringParameterValue',                \
    14                           name: 'buildArchitecture',                    \
    15                           value: arch]                                  \
     76                        [$class: 'BooleanParameterValue',               \
     77                          name: 'pRunBenchmark',                        \
     78                          value: true],                                         \
     79                        [$class: 'BooleanParameterValue',               \
     80                          name: 'pBuildDocumentation',          \
     81                          value: true],                                         \
     82                        [$class: 'BooleanParameterValue',               \
     83                          name: 'pPublish',                             \
     84                          value: true],                                         \
     85                        [$class: 'BooleanParameterValue',               \
     86                          name: 'pSilent',                              \
     87                          value: true],                                         \
    1688                ],                                                              \
    1789                propagate: false
     
    69141
    70142//===========================================================================================================
    71 // Main loop of the compilation
    72 //===========================================================================================================
    73 
    74 node ('master') {
    75         def err = null
    76 
    77         try {
    78                 //Prevent the build from exceeding 30 minutes
    79                 timeout(60) {
    80 
    81                         //Wrap build to add timestamp to command line
    82                         wrap([$class: 'TimestamperBuildWrapper']) {
    83 
    84                                 stage 'Build'
    85 
    86                                         results = [null, null]
    87 
    88                                         parallel (
    89                                                 x64: {
    90                                                         trigger_build('64-bit')
    91                                                 },
    92                                                 x32: {
    93                                                         trigger_build('32-bit')
    94                                                 }
    95                                         )
    96 
    97                                 //Push latest changes to do-lang repo
    98                                 push_build()
    99                         }
    100                 }
    101         }
    102 
    103         //If an exception is caught we need to change the status and remember to
    104         //attach the build log to the email
    105         catch (Exception caughtError) {
    106                 echo('error caught')
    107 
    108                 //rethrow error later
    109                 err = caughtError
    110 
    111                 //Store the result of the build log
    112                 currentBuild.result = 'FAILURE'
    113 
    114                 //Send email to notify the failure
    115                 promote_failure_email()
    116         }
    117 
    118         finally {
    119                 //Must re-throw exception to propagate error
    120                 if (err) {
    121                         throw err
    122                 }
    123         }
    124 }
    125 //===========================================================================================================
    126143//Routine responsible of sending the email notification once the build is completed
    127144//===========================================================================================================
Note: See TracChangeset for help on using the changeset viewer.