Changeset d3b95f1
- Timestamp:
- Jun 8, 2021, 8:49:28 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- c0c4d4f
- Parents:
- 5e64df8e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r5e64df8e rd3b95f1 7 7 //=========================================================================================================== 8 8 9 node { 10 // Globals 11 BuildDir = pwd tmp: true12 SrcDir = pwd tmp: false 13 Settings= null14 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 line24 wrap([$class: 'TimestamperBuildWrapper']) { 25 9 // Globals 10 BuildDir = pwd tmp: true 11 SrcDir = pwd tmp: false 12 Settings = null 13 Tools = null 14 15 // Local variables 16 def err = null 17 def log_needed = false 18 19 currentBuild.result = "SUCCESS" 20 21 try { 22 //Wrap build to add timestamp to command line 23 wrap([$class: 'TimestamperBuildWrapper']) { 24 25 node { 26 26 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) { 49 30 BuildDir = pwd tmp: true 50 31 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 57 catch (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 71 finally { 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 80 80 } 81 81 }
Note: See TracChangeset
for help on using the changeset viewer.