Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

    r644ec6a re67f54c  
    44// Main compilation routines
    55//===========================================================================================================
    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 
    226def push_build() {
    237        //Don't use the build_stage function which outputs the compiler
     
    2812                def out_dir = pwd tmp: true
    2913                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()
    3514
    3615                //parse git logs to find what changed
     
    4322                }
    4423
    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"
    6225}
    6326
     
    6528// Main loop of the compilation
    6629//===========================================================================================================
    67 
    68 node ('master') {
     30node ('master'){
    6931        try {
    7032                //Prevent the build from exceeding 30 minutes
     
    7638                                stage 'Build'
    7739
    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                                        )
    8864
    8965                                //Push latest changes to do-lang repo
    90                                 push_build()
     66                                //push_build()
    9167                        }
    9268                }
     
    10379
    10480                //Send email to notify the failure
    105                 promote_email(currentBuild.result)
     81                //promote_email(currentBuild.result)
    10682        }
    10783
     
    11389        }
    11490}
     91
    11592//===========================================================================================================
    11693//Routine responsible of sending the email notification once the build is completed
Note: See TracChangeset for help on using the changeset viewer.