Changeset 13c98a4
- Timestamp:
- Apr 24, 2019, 3:14:32 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 3c40dc2a
- Parents:
- f85464da
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified Jenkins/FullBuild ¶
rf85464da r13c98a4 27 27 28 28 //Push latest changes to do-lang repo 29 push_build()29 // push_build() 30 30 } 31 32 promote_email(true) 31 33 } 32 34 … … 43 45 44 46 //Send email to notify the failure 45 promote_ failure_email()47 promote_email(false) 46 48 } 47 49 … … 92 94 } 93 95 94 def push_build() {95 //Don't use the build_stage function which outputs the compiler96 stage('Push') {96 // def push_build() { 97 // //Don't use the build_stage function which outputs the compiler 98 // stage('Push') { 97 99 98 status_prefix = 'Push'100 // status_prefix = 'Push' 99 101 100 def out_dir = pwd tmp: true101 sh "mkdir -p ${out_dir}"102 // def out_dir = pwd tmp: true 103 // sh "mkdir -p ${out_dir}" 102 104 103 //checkout the code to make sure this is a valid git repo104 checkout scm105 // //checkout the code to make sure this is a valid git repo 106 // checkout scm 105 107 106 collect_git_info()108 // collect_git_info() 107 109 108 //parse git logs to find what changed109 sh "git remote > ${out_dir}/GIT_REMOTE"110 git_remote = readFile("${out_dir}/GIT_REMOTE")111 remoteDoLangExists = git_remote.contains("DoLang")110 // //parse git logs to find what changed 111 // sh "git remote > ${out_dir}/GIT_REMOTE" 112 // git_remote = readFile("${out_dir}/GIT_REMOTE") 113 // remoteDoLangExists = git_remote.contains("DoLang") 112 114 113 if( !remoteDoLangExists ) {114 sh 'git remote add DoLang git@gitlab.do-lang.org:internal/cfa-cc.git'115 }115 // if( !remoteDoLangExists ) { 116 // sh 'git remote add DoLang git@gitlab.do-lang.org:internal/cfa-cc.git' 117 // } 116 118 117 //sh "GIT_SSH_COMMAND=\"ssh -v\" git push DoLang ${gitRefNewValue}:master"118 echo('BUILD NOT PUSH SINCE DO-LANG SERVER WAS DOWN')119 }120 }119 // //sh "GIT_SSH_COMMAND=\"ssh -v\" git push DoLang ${gitRefNewValue}:master" 120 // echo('BUILD NOT PUSH SINCE DO-LANG SERVER WAS DOWN') 121 // } 122 // } 121 123 122 124 //Helper routine to collect information about the git history … … 141 143 142 144 //Email notification on a full build failure 143 def promote_ failure_email() {145 def promote_email(boolean success) { 144 146 echo('notifying users') 147 148 def result = success ? "PROMOTE - SUCCESS" : "PROMOTE - FAILURE" 145 149 146 150 //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line 147 151 //Configurations for email format 148 def email_subject = "[cforall git][PROMOTE - FAILURE]" 149 def email_body = """This is an automated email from the Jenkins build machine. It was 150 generated because of a git hooks/post-receive script following 151 a ref change was pushed to the repository containing 152 the project "UNNAMED PROJECT". 152 def email_subject = "[cforall git][${result}]" 153 def email_body = """<p>This is an automated email from the Jenkins build machine. It was 154 generated following the result of the C∀ nightly build.</p> 153 155 154 Check console output at ${env.BUILD_URL} to view the results. 156 <p>Check console output at ${env.BUILD_URL} to view the results.</p> 155 157 156 - Status -------------------------------------------------------------- 158 <p>- Status --------------------------------------------------------------</p> 157 159 158 PROMOTE FAILURE 160 <p>${result}</p> 161 162 <p>- Performance --------------------------------------------------------------</p> 163 164 <img src="https://cforall.uwaterloo.ca/jenkins/view/all/job/Plot%20Plugin%20Test/plot/getPlot?index=0" > 159 165 """ 160 166 … … 162 168 163 169 //send email notification 164 emailext body: email_body, subject: email_subject, to: email_to, attachLog: true170 emailext body: email_body, subject: email_subject, to: email_to, attachLog: !success 165 171 } -
TabularUnified Jenkinsfile ¶
rf85464da r13c98a4 66 66 finally { 67 67 //Send email with final results if this is not a full build 68 if( Settings && !Settings.Silent ) { 69 email(log_needed, Settings.IsSandbox) 70 } 68 email(log_needed) 71 69 72 70 echo 'Build Completed' … … 200 198 201 199 return """ 200 <pre> 202 201 The branch ${env.BRANCH_NAME} has been updated. 203 202 ${gitUpdate} 204 205 Check console output at ${env.BUILD_URL} to view the results. 206 207 - Status -------------------------------------------------------------- 208 209 BUILD# ${env.BUILD_NUMBER} - ${currentBuild.result} 210 211 - Log ----------------------------------------------------------------- 203 </pre> 204 205 <p>Check console output at ${env.BUILD_URL} to view the results.</p> 206 207 <p>- Status --------------------------------------------------------------</p> 208 209 <p>BUILD# ${env.BUILD_NUMBER} - ${currentBuild.result}</p> 210 211 <p>- Log -----------------------------------------------------------------</p> 212 213 <pre> 212 214 ${gitLog} 213 ----------------------------------------------------------------------- 215 </pre> 216 217 <p>-----------------------------------------------------------------------</p> 218 <pre> 214 219 Summary of changes: 215 220 ${gitDiff} 221 </pre> 216 222 """ 217 223 } 218 224 219 225 //Standard build email notification 220 def email(boolean log , boolean bIsSandbox) {226 def email(boolean log) { 221 227 //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line 222 228 //Configurations for email format … … 225 231 def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase() 226 232 def email_subject = "[${project_name} git][BUILD# ${env.BUILD_NUMBER} - ${currentBuild.result}] - branch ${env.BRANCH_NAME}" 227 def email_body = """ This is an automated email from the Jenkins build machine. It was233 def email_body = """<p>This is an automated email from the Jenkins build machine. It was 228 234 generated because of a git hooks/post-receive script following 229 a ref change which was pushed to the C forall repository.235 a ref change which was pushed to the C∀ repository.</p> 230 236 """ + GitLogMessage() 231 237 232 def email_to = "cforall@lists.uwaterloo.ca"233 234 if( Settings && !Settings. IsSandbox) {238 def email_to = !Settings.IsSandbox ? "cforall@lists.uwaterloo.ca" : "tdelisle@uwaterloo.ca" 239 240 if( Settings && !Settings.Silent ) { 235 241 //send email notification 236 242 emailext body: email_body, subject: email_subject, to: email_to, attachLog: log -
TabularUnified tools/PrettyGitLogs.sh ¶
rf85464da r13c98a4 27 27 git rev-list --format=short ${GitOldRef}...${GitNewRef} > ${GIT_LOG} 28 28 29 git diff --stat ${GitNewRef} ${GitOldRef}> ${GIT_DIFF}29 git diff --stat --color ${GitNewRef} ${GitOldRef} | sed -e 's/\[32m/<span style\=\"color\: \#00AA00\;\">/g' -e 's/\[31m/<span style\=\"color\: \#AA0000\;\">/g' -e 's/\[m/<\/span>/g' > ${GIT_DIFF}
Note: See TracChangeset
for help on using the changeset viewer.