Changes in Jenkins/FullBuild [e67f54c:644ec6a]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkins/FullBuild
re67f54c r644ec6a 4 4 // Main compilation routines 5 5 //=========================================================================================================== 6 7 def trigger_build(String arch) { 8 def result = build job: 'Cforall/master', \ 9 parameters: [ \ 10 [$class: 'BooleanParameterValue', \ 11 name: 'isFullBuild', \ 12 value: true], \ 13 [$class: 'StringParameterValue', \ 14 name: 'buildArchitecture', \ 15 value: arch] \ 16 ] 17 18 echo(result.result) 19 echo(result.absoluteUrl) 20 } 21 6 22 def push_build() { 7 23 //Don't use the build_stage function which outputs the compiler … … 12 28 def out_dir = pwd tmp: true 13 29 sh "mkdir -p ${out_dir}" 30 31 //checkout the code to make sure this is a valid git repo 32 checkout scm 33 34 collect_git_info() 14 35 15 36 //parse git logs to find what changed … … 22 43 } 23 44 24 sh "git push DoLang ${gitRefNewValue}:master" 45 sh "GIT_SSH_COMMAND=\"ssh -v\" git push DoLang ${gitRefNewValue}:master" 46 } 47 48 //Helper routine to collect information about the git history 49 def collect_git_info() { 50 51 //create the temporary output directory in case it doesn't already exist 52 def out_dir = pwd tmp: true 53 sh "mkdir -p ${out_dir}" 54 55 //parse git logs to find what changed 56 dir("../Cforall_Full_Build@script") { 57 sh "git reflog > ${out_dir}/GIT_COMMIT" 58 } 59 git_reflog = readFile("${out_dir}/GIT_COMMIT") 60 gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1] 61 gitRefNewValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][2] 25 62 } 26 63 … … 28 65 // Main loop of the compilation 29 66 //=========================================================================================================== 30 node ('master'){ 67 68 node ('master') { 31 69 try { 32 70 //Prevent the build from exceeding 30 minutes … … 38 76 stage 'Build' 39 77 40 parallel ( 41 x64: { node ('master') { 42 build job: 'Cforall/master', \ 43 parameters: [ \ 44 [$class: 'BooleanParameterValue', \ 45 name: 'isFullBuild', \ 46 value: true], \ 47 [$class: 'StringParameterValue', \ 48 name: 'buildArchitecture', \ 49 value: '64-bit'] \ 50 ] 51 }}, 52 x32: { node ('master') { 53 build job: 'Cforall/master', \ 54 parameters: [ \ 55 [$class: 'BooleanParameterValue', \ 56 name: 'isFullBuild', \ 57 value: true], \ 58 [$class: 'StringParameterValue', \ 59 name: 'buildArchitecture', \ 60 value: '32-bit'] \ 61 ] 62 }} 63 ) 78 results = [null, null] 79 80 // parallel ( 81 // x64: { 82 // trigger_build('64-bit') 83 // }, 84 // x32: { 85 // trigger_build('32-bit') 86 // } 87 // ) 64 88 65 89 //Push latest changes to do-lang repo 66 //push_build()90 push_build() 67 91 } 68 92 } … … 79 103 80 104 //Send email to notify the failure 81 //promote_email(currentBuild.result)105 promote_email(currentBuild.result) 82 106 } 83 107 … … 89 113 } 90 114 } 91 92 115 //=========================================================================================================== 93 116 //Routine responsible of sending the email notification once the build is completed
Note: See TracChangeset
for help on using the changeset viewer.