Changes in Jenkins/FullBuild [644ec6a:e67f54c]
- File:
-
- 1 edited
-
Jenkins/FullBuild (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Jenkins/FullBuild
r644ec6a re67f54c 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 22 6 def push_build() { 23 7 //Don't use the build_stage function which outputs the compiler … … 28 12 def out_dir = pwd tmp: true 29 13 sh "mkdir -p ${out_dir}" 30 31 //checkout the code to make sure this is a valid git repo32 checkout scm33 34 collect_git_info()35 14 36 15 //parse git logs to find what changed … … 43 22 } 44 23 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] 24 sh "git push DoLang ${gitRefNewValue}:master" 62 25 } 63 26 … … 65 28 // Main loop of the compilation 66 29 //=========================================================================================================== 67 68 node ('master') { 30 node ('master'){ 69 31 try { 70 32 //Prevent the build from exceeding 30 minutes … … 76 38 stage 'Build' 77 39 78 results = [null, null] 79 80 // parallel ( 81 // x64: { 82 // trigger_build('64-bit') 83 // }, 84 // x32: { 85 // trigger_build('32-bit') 86 // } 87 // ) 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 ) 88 64 89 65 //Push latest changes to do-lang repo 90 push_build()66 //push_build() 91 67 } 92 68 } … … 103 79 104 80 //Send email to notify the failure 105 promote_email(currentBuild.result)81 //promote_email(currentBuild.result) 106 82 } 107 83 … … 113 89 } 114 90 } 91 115 92 //=========================================================================================================== 116 93 //Routine responsible of sending the email notification once the build is completed
Note:
See TracChangeset
for help on using the changeset viewer.