Changeset 9dd31e7
- Timestamp:
- Dec 17, 2020, 11:18:24 AM (2 years ago)
- Branches:
- arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 7522692
- Parents:
- 18e4cd0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkins/tools.groovy
r18e4cd0 r9dd31e7 6 6 import org.jenkinsci.plugins.pipeline.modeldefinition.Utils 7 7 8 // Global for the stage name9 StageName = ''10 11 8 // wrapper around stage declaretion to be more verbose 12 9 // and allow showing as skipped in the UI 13 10 def BuildStage(String name, boolean run, Closure block ) { 14 StageName = name 15 echo " -------- ${StageName} -------- " 11 echo " -------- ${name} -------- " 16 12 if(run) { 17 13 stage(name, block) -
Jenkinsfile
r18e4cd0 r9dd31e7 27 27 28 28 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() 52 45 } 53 46 … … 61 54 //attach the build log to the email 62 55 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 64 60 log_needed = true 65 61 66 // rethrow error later62 // rethrow error later 67 63 err = caughtError 68 64 69 echo "Error caught, status: ${currentBuild.result}"65 // print the error so it shows in the log 70 66 echo err.toString() 71 67 }
Note: See TracChangeset
for help on using the changeset viewer.