source: Jenkinsfile@ 84f53b4

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors ctor deferred_resn demangler enum forall-pointer-decay gc_noraii jacob/cs343-translation jenkins-sandbox memory new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new with_gc
Last change on this file since 84f53b4 was 84f53b4, checked in by Thierry Delisle <tdelisle@…>, 10 years ago

fixed typos in Jenkinsfile

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[c9d651d]1
2
[fde808df]3node ('master'){
[23a14d86]4
[fde808df]5 def err = null
6 def stage_name
7 def log_needed = false
8 currentBuild.result = "SUCCESS"
[7aebc62]9
[d3d0069]10 try {
[fde808df]11
12 stage 'Checkout'
13
14 //checkout the source code and clean the repo
15 checkout scm
16 sh 'git clean -dfq'
17
18 stage 'Build'
19
20 stage_name = 'Build'
21
22 //configure the conpilation
23 //Don't remove outputs for the clean and configure unless errors are present
24 sh 'make clean > /dev/null'
25 sh 'CC=gcc-4.9 CXX=g++-4.9 ./configure > /dev/null'
26 sh 'make -j 8'
27
28 stage 'Test'
29
30 stage_name = 'Test'
31
[84f53b4]32 dir ('src/examples') {
[fde808df]33 sh './runTests.sh'
34 }
35
36 stage 'Cleanup'
37
38 email("SUCCESS", false)
[f43a200]39 }
40
[fde808df]41 catch (Exception caughtError) {
42 err = caughtError
[1e44b60]43 log_needed = false
44 currentBuild.result = "FAILURE"
[fde808df]45
[84f53b4]46 switch(stage_name) {
[fde808df]47 case 'Test' :
48 currentBuild.result = "TEST FAILURE"
49 break
50 default :
51 break
52 }
53 }
54
55 finally {
56 //Send email with final results
57 email(currentBuild.result, log_needed)
58
59 /* Must re-throw exception to propagate error */
60 if (err) {
61 throw err
62 }
[d3d0069]63 }
[7aebc62]64}
[f2b977a]65
[19ad15b]66def email(String status, boolean log) {
[e8a22a7]67 //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
68 //Configurations for email format
69 def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase()
70
[bb5a0bb]71 def email_subject = "[${project_name} git] UNNAMED PROJECT branch ${env.BRANCH_NAME} - Build # ${env.BUILD_NUMBER} - ${status}!"
[ed091cd]72 def email_body = """ This is an automated email from the Jenkins build machine. It was
[e8a22a7]73 generated because of a git hooks/post-receive script following
74 a ref change was pushed to the repository containing
75 the project "UNNAMED PROJECT".
76
[ed091cd]77 The branch ${env.BRANCH_NAME} has been updated.
[e8a22a7]78
79 Check console output at ${env.BUILD_URL} to view the results."""
80
[a6b7480]81 // def config = new File('/u/cforall/software/cfa/cfa-cc/config').text
82 // def email_to = (config =~ /mailinglist ?= ?(.+)/)[0][1]
83 def email_to = "pabuhr@uwaterloo.ca, rschlunt@uwaterloo.ca, a3moss@uwaterloo.ca, tdelisle@uwaterloo.ca, brice.dobry@huawei.com"
[e8a22a7]84
85 //send email notification
[1e34653]86 emailext body: email_body, subject: email_subject, to: email_to, attachLog: log
[e8a22a7]87}
Note: See TracBrowser for help on using the repository browser.