ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since a6b7480 was
a6b7480,
checked in by Peter A. Buhr <pabuhr@…>, 8 years ago
|
add build email addresses to Jenkinsfile
|
-
Property mode set to
100644
|
File size:
1.6 KB
|
Rev | Line | |
---|
[c9d651d] | 1 | |
---|
| 2 | |
---|
[c78e410] | 3 | //checkout the source code and clean the repo |
---|
[7aebc62] | 4 | stage 'Checkout' |
---|
| 5 | node { |
---|
[f2b977a] | 6 | checkout scm |
---|
[1e34653] | 7 | sh 'git clean -dfq' |
---|
[7aebc62] | 8 | } |
---|
[23a14d86] | 9 | |
---|
[7aebc62] | 10 | |
---|
| 11 | stage 'Build' |
---|
| 12 | node ('master'){ |
---|
[d3d0069] | 13 | try { |
---|
[1da4ead] | 14 | //configure the conpilation |
---|
| 15 | //Don't remove outputs for the clean and configure unless errors are present |
---|
[c78e410] | 16 | sh 'make clean > /dev/null' |
---|
[e8a22a7] | 17 | sh 'CC=gcc-4.9 CXX=g++-4.9 ./configure > /dev/null' |
---|
[ed091cd] | 18 | sh 'make -j 8' |
---|
[1e34653] | 19 | email("SUCCESS", false) |
---|
[1da4ead] | 20 | |
---|
| 21 | //something happen, this build is a failure |
---|
[d3d0069] | 22 | } catch (Exception e) { |
---|
[1e34653] | 23 | email("FAILURE", true) |
---|
[e8a22a7] | 24 | throw e; |
---|
[d3d0069] | 25 | } |
---|
[7aebc62] | 26 | } |
---|
[f2b977a] | 27 | |
---|
[19ad15b] | 28 | def email(String status, boolean log) { |
---|
[e8a22a7] | 29 | //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line |
---|
| 30 | //Configurations for email format |
---|
| 31 | def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase() |
---|
| 32 | |
---|
[bb5a0bb] | 33 | def email_subject = "[${project_name} git] UNNAMED PROJECT branch ${env.BRANCH_NAME} - Build # ${env.BUILD_NUMBER} - ${status}!" |
---|
[ed091cd] | 34 | def email_body = """ This is an automated email from the Jenkins build machine. It was |
---|
[e8a22a7] | 35 | generated because of a git hooks/post-receive script following |
---|
| 36 | a ref change was pushed to the repository containing |
---|
| 37 | the project "UNNAMED PROJECT". |
---|
| 38 | |
---|
[ed091cd] | 39 | The branch ${env.BRANCH_NAME} has been updated. |
---|
[e8a22a7] | 40 | |
---|
| 41 | Check console output at ${env.BUILD_URL} to view the results.""" |
---|
| 42 | |
---|
[a6b7480] | 43 | // def config = new File('/u/cforall/software/cfa/cfa-cc/config').text |
---|
| 44 | // def email_to = (config =~ /mailinglist ?= ?(.+)/)[0][1] |
---|
| 45 | def email_to = "pabuhr@uwaterloo.ca, rschlunt@uwaterloo.ca, a3moss@uwaterloo.ca, tdelisle@uwaterloo.ca, brice.dobry@huawei.com" |
---|
[e8a22a7] | 46 | |
---|
| 47 | //send email notification |
---|
[1e34653] | 48 | emailext body: email_body, subject: email_subject, to: email_to, attachLog: log |
---|
[e8a22a7] | 49 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.