Changeset fb975a50
- Timestamp:
- Aug 9, 2018, 1:03:45 PM (5 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, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 455a7d5
- Parents:
- db583df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
rdb583df rfb975a50 172 172 Silent : ${ pSilent.toString() } 173 173 """ 174 175 176 //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line177 //Configurations for email format178 def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase()179 180 def gitLog = 'Error retrieving git logs'181 def gitDiff = 'Error retrieving git diff'182 def gitUpdate = 'Error retrieving update'183 184 try {185 gitUpdate = gitBranchUpdate(gitRefOldValue, gitRefNewValue)186 187 sh "git rev-list --format=short ${gitRefOldValue}...${gitRefNewValue} > GIT_LOG"188 gitLog = readFile('GIT_LOG')189 190 sh "git diff --stat ${gitRefNewValue} ${gitRefOldValue} > GIT_DIFF"191 gitDiff = readFile('GIT_DIFF')192 }193 catch (Exception error) {194 echo error.toString()195 echo error.getMessage()196 }197 198 def email_subject = "[${project_name} git][BUILD# ${env.BUILD_NUMBER} - ${status}] - branch ${env.BRANCH_NAME}"199 def email_body = """This is an automated email from the Jenkins build machine. It was200 generated because of a git hooks/post-receive script following201 a ref change was pushed to the repository containing202 the project "UNNAMED PROJECT".203 204 The branch ${env.BRANCH_NAME} has been updated.205 ${gitUpdate}206 207 Check console output at ${env.BUILD_URL} to view the results.208 209 - Status --------------------------------------------------------------210 211 BUILD# ${env.BUILD_NUMBER} - ${status}212 213 - Log -----------------------------------------------------------------214 ${gitLog}215 -----------------------------------------------------------------------216 Summary of changes:217 ${gitDiff}218 """219 220 echo email_body221 174 } 222 175 … … 427 380 gitDiff = readFile('GIT_DIFF') 428 381 } 429 catch (Exception error) {} 382 catch (Exception error) { 383 echo error.toString() 384 echo error.getMessage() 385 } 430 386 431 387 def email_subject = "[${project_name} git][BUILD# ${env.BUILD_NUMBER} - ${status}] - branch ${env.BRANCH_NAME}"
Note: See TracChangeset
for help on using the changeset viewer.