Changeset 9dd31e7


Ignore:
Timestamp:
Dec 17, 2020, 11:18:24 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
7522692
Parents:
18e4cd0
Message:

Removed StageName? global as it doesn't seem to work and it's not that useful

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/tools.groovy

    r18e4cd0 r9dd31e7  
    66import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
    77
    8 // Global for the stage name
    9 StageName = ''
    10 
    118// wrapper around stage declaretion to be more verbose
    129// and allow showing as skipped in the UI
    1310def BuildStage(String name, boolean run, Closure block ) {
    14         StageName = name
    15         echo " -------- ${StageName} -------- "
     11        echo " -------- ${name} -------- "
    1612        if(run) {
    1713                stage(name, block)
  • Jenkinsfile

    r18e4cd0 r9dd31e7  
    2727
    2828                        node(Settings.Architecture.node) {
    29                                 try {
    30                                         BuildDir  = pwd tmp: true
    31                                         SrcDir    = pwd tmp: false
    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                                 catch (Exception e) {
    48                                         //Store the result of the build log
    49                                         currentBuild.result = "${Tools.StageName} FAILURE".trim()
    50                                         throw e
    51                                 }
     29                                BuildDir  = pwd tmp: true
     30                                SrcDir    = pwd tmp: false
     31
     32                                Tools.Clean()
     33
     34                                Tools.Checkout()
     35
     36                                build()
     37
     38                                test()
     39
     40                                benchmark()
     41
     42                                build_doc()
     43
     44                                publish()
    5245                        }
    5346
     
    6154        //attach the build log to the email
    6255        catch (Exception caughtError) {
    63                 //An error has occured, the build log is relevent
     56                // Store the result of the build log
     57                currentBuild.result = "FAILURE"
     58
     59                // An error has occured, the build log is relevent
    6460                log_needed = true
    6561
    66                 //rethrow error later
     62                // rethrow error later
    6763                err = caughtError
    6864
    69                 echo "Error caught, status: ${currentBuild.result}"
     65                // print the error so it shows in the log
    7066                echo err.toString()
    7167        }
Note: See TracChangeset for help on using the changeset viewer.