- Timestamp:
- Feb 16, 2017, 2:33:21 PM (8 years ago)
- 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:
- 8a7db7c
- Parents:
- 0ef06b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkins/FullBuild
r0ef06b6 rae28ee2 1 1 #!groovy 2 2 3 //=========================================================================================================== 4 // Main loop of the compilation 5 //=========================================================================================================== 6 7 node ('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 x64: { 23 trigger_build('64-bit') 24 }, 25 x32: { 26 trigger_build('32-bit') 27 } 28 ) 29 30 //Push latest changes to do-lang repo 31 push_build() 32 } 33 } 34 } 35 36 //If an exception is caught we need to change the status and remember to 37 //attach the build log to the email 38 catch (Exception caughtError) { 39 echo('error caught') 40 41 //rethrow error later 42 err = caughtError 43 44 //Store the result of the build log 45 currentBuild.result = 'FAILURE' 46 47 //Send email to notify the failure 48 promote_failure_email() 49 } 50 51 finally { 52 //Must re-throw exception to propagate error 53 if (err) { 54 throw err 55 } 56 } 57 } 3 58 //=========================================================================================================== 4 59 // Main compilation routines … … 69 124 70 125 //=========================================================================================================== 71 // Main loop of the compilation72 //===========================================================================================================73 74 node ('master') {75 def err = null76 77 try {78 //Prevent the build from exceeding 30 minutes79 timeout(60) {80 81 //Wrap build to add timestamp to command line82 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 repo98 push_build()99 }100 }101 }102 103 //If an exception is caught we need to change the status and remember to104 //attach the build log to the email105 catch (Exception caughtError) {106 echo('error caught')107 108 //rethrow error later109 err = caughtError110 111 //Store the result of the build log112 currentBuild.result = 'FAILURE'113 114 //Send email to notify the failure115 promote_failure_email()116 }117 118 finally {119 //Must re-throw exception to propagate error120 if (err) {121 throw err122 }123 }124 }125 //===========================================================================================================126 126 //Routine responsible of sending the email notification once the build is completed 127 127 //===========================================================================================================
Note: See TracChangeset
for help on using the changeset viewer.