Changes in / [e056330:c0c4d4f]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    re056330 rc0c4d4f  
    77//===========================================================================================================
    88
    9 node {
    10         // Globals
    11         BuildDir  = pwd tmp: true
    12         SrcDir    = pwd tmp: false
    13         Settings  = null
    14         Tools     = null
    15 
    16         // Local variables
    17         def err = null
    18         def log_needed = false
    19 
    20         currentBuild.result = "SUCCESS"
    21 
    22         try {
    23                 //Wrap build to add timestamp to command line
    24                 wrap([$class: 'TimestamperBuildWrapper']) {
    25 
     9// Globals
     10BuildDir  = pwd tmp: true
     11SrcDir    = pwd tmp: false
     12Settings  = null
     13Tools     = null
     14
     15// Local variables
     16def err = null
     17def log_needed = false
     18
     19currentBuild.result = "SUCCESS"
     20
     21try {
     22        //Wrap build to add timestamp to command line
     23        wrap([$class: 'TimestamperBuildWrapper']) {
     24
     25                node {
    2626                        Settings = prepare_build()
    27 
    28                         node(Settings.Architecture.node) {
    29                                 BuildDir  = pwd tmp: true
    30                                 SrcDir    = pwd tmp: false
    31                                 currentBuild.description = "${currentBuild.description} on ${env.NODE_NAME}"
    32 
    33                                 Tools.Clean()
    34 
    35                                 Tools.Checkout()
    36 
    37                                 build()
    38 
    39                                 test()
    40 
    41                                 benchmark()
    42 
    43                                 build_doc()
    44 
    45                                 publish()
    46                         }
    47 
    48                         // Update the build directories when exiting the node
     27                }
     28
     29                node(Settings.Architecture.node) {
    4930                        BuildDir  = pwd tmp: true
    5031                        SrcDir    = pwd tmp: false
    51                 }
    52         }
    53 
    54         //If an exception is caught we need to change the status and remember to
    55         //attach the build log to the email
    56         catch (Exception caughtError) {
    57                 // Store the result of the build log
    58                 currentBuild.result = "FAILURE"
    59 
    60                 // An error has occured, the build log is relevent
    61                 log_needed = true
    62 
    63                 // rethrow error later
    64                 err = caughtError
    65 
    66                 // print the error so it shows in the log
    67                 echo err.toString()
    68         }
    69 
    70         finally {
    71                 //Send email with final results if this is not a full build
    72                 email(log_needed)
    73 
    74                 echo 'Build Completed'
    75 
    76                 /* Must re-throw exception to propagate error */
    77                 if (err) {
    78                         throw err
    79                 }
     32                        currentBuild.description = "${currentBuild.description} on ${env.NODE_NAME}"
     33
     34                        Tools.Clean()
     35
     36                        Tools.Checkout()
     37
     38                        build()
     39
     40                        test()
     41
     42                        benchmark()
     43
     44                        build_doc()
     45
     46                        publish()
     47                }
     48
     49                // Update the build directories when exiting the node
     50                BuildDir  = pwd tmp: true
     51                SrcDir    = pwd tmp: false
     52        }
     53}
     54
     55//If an exception is caught we need to change the status and remember to
     56//attach the build log to the email
     57catch (Exception caughtError) {
     58        // Store the result of the build log
     59        currentBuild.result = "FAILURE"
     60
     61        // An error has occured, the build log is relevent
     62        log_needed = true
     63
     64        // rethrow error later
     65        err = caughtError
     66
     67        // print the error so it shows in the log
     68        echo err.toString()
     69}
     70
     71finally {
     72        //Send email with final results if this is not a full build
     73        email(log_needed)
     74
     75        echo 'Build Completed'
     76
     77        /* Must re-throw exception to propagate error */
     78        if (err) {
     79                throw err
    8080        }
    8181}
Note: See TracChangeset for help on using the changeset viewer.