source: Jenkins/FullBuild @ 1b8c156

aaron-thesisarm-ehcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 1b8c156 was 1b8c156, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

added jenkins script for full build

  • Property mode set to 100644
File size: 1.5 KB
Line 
1#!groovy
2
3
4def push_build() {
5        //Don't use the build_stage function which outputs the compiler
6        stage 'Push'
7
8                status_prefix = 'Push'
9
10                def out_dir = pwd tmp: true
11                sh "mkdir -p ${out_dir}"
12
13                //parse git logs to find what changed
14                sh "git remote > ${out_dir}/GIT_REMOTE"
15                git_remote = readFile("${out_dir}/GIT_REMOTE")
16                remoteDoLangExists = git_remote.contains("DoLang")
17
18                if( !remoteDoLangExists ) {
19                        sh 'git remote add DoLang git@gitlab.do-lang.org:internal/cfa-cc.git'
20                }
21
22                sh "git push DoLang ${gitRefNewValue}:master"
23}
24
25
26//Email notification on a full build failure
27def promote_email(String status) {
28        //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
29        //Configurations for email format
30        def email_subject = "[cforall git][PROMOTE - FAILURE]"
31        def email_body = """This is an automated email from the Jenkins build machine. It was
32generated because of a git hooks/post-receive script following
33a ref change was pushed to the repository containing
34the project "UNNAMED PROJECT".
35
36Check console output at ${env.BUILD_URL} to view the results.
37
38- Status --------------------------------------------------------------
39
40PROMOTE FAILURE - ${status}
41"""
42
43        def email_to = "pabuhr@uwaterloo.ca, rschlunt@uwaterloo.ca, a3moss@uwaterloo.ca, tdelisle@uwaterloo.ca, brice.dobry@huawei.com"
44
45        //send email notification
46        emailext body: email_body, subject: email_subject, to: email_to, attachLog: true
47}
Note: See TracBrowser for help on using the repository browser.