Changes in Jenkins/FullBuild [5a11e07:cb2e8ce]
- File:
-
- 1 edited
-
Jenkins/FullBuild (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Jenkins/FullBuild
r5a11e07 rcb2e8ce 14 14 name: 'buildArchitecture', \ 15 15 value: arch] \ 16 ], \ 17 propagate: false 16 ] 18 17 19 18 echo(result.result) 20 21 if(result.result != 'SUCCESS') { 22 sh("wget -q -O - ${result.absoluteUrl}/consoleText") 23 error(result.result) 24 } 19 echo(result.absoluteUrl) 25 20 } 26 21 … … 37 32 checkout scm 38 33 39 collect_git_info()40 41 34 //parse git logs to find what changed 42 35 sh "git remote > ${out_dir}/GIT_REMOTE" … … 48 41 } 49 42 50 //sh "GIT_SSH_COMMAND=\"ssh -v\" git push DoLang ${gitRefNewValue}:master" 51 echo('BUILD NOT PUSH SINCE DO-LANG SERVER WAS DOWN') 52 } 53 54 //Helper routine to collect information about the git history 55 def collect_git_info() { 56 57 //create the temporary output directory in case it doesn't already exist 58 def out_dir = pwd tmp: true 59 sh "mkdir -p ${out_dir}" 60 61 //parse git logs to find what changed 62 dir("../Cforall_Full_Build@script") { 63 sh "git reflog > ${out_dir}/GIT_COMMIT" 64 } 65 git_reflog = readFile("${out_dir}/GIT_COMMIT") 66 gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1] 67 gitRefNewValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][2] 43 sh "git push DoLang ${gitRefNewValue}:master" 68 44 } 69 45 … … 73 49 74 50 node ('master') { 75 def err = null76 77 51 try { 78 52 //Prevent the build from exceeding 30 minutes … … 104 78 //attach the build log to the email 105 79 catch (Exception caughtError) { 106 echo('error caught')107 108 80 //rethrow error later 109 81 err = caughtError 110 82 111 83 //Store the result of the build log 112 currentBuild.result = 'FAILURE'84 currentBuild.result = "${status_prefix} FAILURE".trim() 113 85 114 86 //Send email to notify the failure 115 promote_ failure_email()87 promote_email(currentBuild.result) 116 88 } 117 89 … … 128 100 129 101 //Email notification on a full build failure 130 def promote_failure_email() { 131 echo('notifying users') 132 102 def promote_email(String status) { 133 103 //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line 134 104 //Configurations for email format … … 143 113 - Status -------------------------------------------------------------- 144 114 145 PROMOTE FAILURE 115 PROMOTE FAILURE - ${status} 146 116 """ 147 117
Note:
See TracChangeset
for help on using the changeset viewer.