Changes in / [905cf4b:89ce869]
- File:
-
- 1 edited
-
Jenkinsfile (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r905cf4b r89ce869 33 33 //do a maintainer-clean to make sure we need to remake from scratch 34 34 sh 'make maintainer-clean > /dev/null' 35 }36 37 def push_build() {38 build_stage 'Push'39 40 sh 'git remote add DoLang git@gitlab.do-lang.org:internal/cfa-cc.git'41 sh 'git push DoLang master'42 35 } 43 36 … … 103 96 collect_git_info() 104 97 105 properties ([ \106 [$class: 'ParametersDefinitionProperty', \107 parameterDefinitions: [ \108 [$class: 'BooleanParameterDefinition', \109 defaultValue: false, \110 description: 'If true, the build will be promoted to the do-lang git repository (on successful builds only)', \111 name: 'promoteBuild2DoLang' \112 ]] \113 ]])114 115 echo "FULL BUILD = ${promoteBuild2DoLang}"116 117 98 //Compile using gcc-4.9 118 99 currentCC = new CC_Desc('gcc-4.9', 'g++-4.9', 'gcc-4.9') … … 127 108 cfa_build() 128 109 129 if(promote_build) {130 push_build()131 }132 110 } 133 111 } … … 149 127 finally { 150 128 //Send email with final results 151 notify_result(promote_build, err != null,currentBuild.result, log_needed)129 email(currentBuild.result, log_needed) 152 130 153 131 /* Must re-throw exception to propagate error */ … … 161 139 //Routine responsible of sending the email notification once the build is completed 162 140 //=========================================================================================================== 163 def promote_email(boolean promote, boolean success, String status, boolean log) {164 if(promote) {165 if( !success ) {166 promote_email(status)167 }168 }169 else {170 email(status, log)171 }172 }173 174 //Email notification on a full build failure175 def promote_email(String status) {176 //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line177 //Configurations for email format178 def email_subject = "[cforall git][PROMOTE - FAILURE]"179 def email_body = """This is an automated email from the Jenkins build machine. It was180 generated because of a git hooks/post-receive script following181 a ref change was pushed to the repository containing182 the project "UNNAMED PROJECT".183 184 Check console output at ${env.BUILD_URL} to view the results.185 186 - Status --------------------------------------------------------------187 188 PROMOTE FAILURE - ${status}189 """190 191 def email_to = "pabuhr@uwaterloo.ca, rschlunt@uwaterloo.ca, a3moss@uwaterloo.ca, tdelisle@uwaterloo.ca, brice.dobry@huawei.com"192 193 //send email notification194 emailext body: email_body, subject: email_subject, to: email_to, attachLog: true195 }196 197 //Standard build email notification198 141 def email(String status, boolean log) { 199 142 //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line … … 214 157 215 158 The branch ${env.BRANCH_NAME} has been updated. 216 via ${gitRefOldValue} (commit)217 from ${gitRefNewValue} (commit)159 via ${gitRefOldValue} (commit) 160 from ${gitRefNewValue} (commit) 218 161 219 162 Check console output at ${env.BUILD_URL} to view the results.
Note:
See TracChangeset
for help on using the changeset viewer.