Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

    r587a608 rb4a573c  
    88        def err = null
    99
    10         final scmVars = checkout scm
    11         final commitId = scmVars.GIT_COMMIT
    12 
    1310        try {
    1411                //Wrap build to add timestamp to command line
     
    1714                        stage('Build') {
    1815
     16                                results = [null, null]
     17
    1918                                parallel (
    20                                         gcc_8_x86_old: { trigger_build( 'gcc-8',   'x86', false ) },
    21                                         gcc_7_x86_old: { trigger_build( 'gcc-7',   'x86', false ) },
    22                                         gcc_6_x86_old: { trigger_build( 'gcc-6',   'x86', false ) },
    23                                         gcc_9_x64_old: { trigger_build( 'gcc-9',   'x64', false ) },
    24                                         gcc_8_x64_old: { trigger_build( 'gcc-8',   'x64', false ) },
    25                                         gcc_7_x64_old: { trigger_build( 'gcc-7',   'x64', false ) },
    26                                         gcc_6_x64_old: { trigger_build( 'gcc-6',   'x64', false ) },
    27                                         gcc_5_x64_old: { trigger_build( 'gcc-5',   'x64', false ) },
    28                                         clang_x64_old: { trigger_build( 'clang',   'x64', false ) },
    29                                         clang_x64_new: { trigger_build( 'clang',   'x64', true  ) },
     19                                        clang_x86: { trigger_build( 'gcc-8',   'x86' ) },
     20                                        gcc_5_x86: { trigger_build( 'gcc-7',   'x86' ) },
     21                                        gcc_6_x86: { trigger_build( 'gcc-6',   'x86' ) },
     22                                        gcc_9_x64: { trigger_build( 'gcc-9',   'x64' ) },
     23                                        gcc_8_x64: { trigger_build( 'gcc-8',   'x64' ) },
     24                                        gcc_7_x64: { trigger_build( 'gcc-7',   'x64' ) },
     25                                        gcc_6_x64: { trigger_build( 'gcc-6',   'x64' ) },
     26                                        gcc_5_x64: { trigger_build( 'gcc-5',   'x64' ) },
     27                                        clang_x64: { trigger_build( 'clang',   'x64' ) },
    3028                                )
    31                         }
    32 
    33                         stage('Package') {
    34                                 trigger_dist( commitId, currentBuild.number.toString() )
    3529                        }
    3630                }
     
    6559//===========================================================================================================
    6660
    67 def trigger_build(String cc, String arch, boolean new_ast) {
     61def trigger_build(String cc, String arch) {
    6862        def result = build job: 'Cforall/master',               \
    6963                parameters: [                                           \
     
    7468                          name: 'Architecture',                         \
    7569                          value: arch],                                 \
    76                         [$class: 'BooleanParameterValue',               \
    77                           name: 'NewAST',                               \
    78                           value: new_ast],                              \
    7970                        [$class: 'BooleanParameterValue',               \
    8071                          name: 'RunAllTests',                          \
     
    8879                        [$class: 'BooleanParameterValue',               \
    8980                          name: 'Publish',                              \
    90                           value: true],                                         \
     81                          value: true],                                 \
    9182                        [$class: 'BooleanParameterValue',               \
    9283                          name: 'Silent',                               \
     
    10394}
    10495
    105 def trigger_dist(String commitId, String buildNum) {
    106         def result = build job: 'Cforall_Distribute_Ref',       \
    107                 parameters: [                                           \
    108                         string(name: 'GitRef', value: commitId),        \
    109                         string(name: 'Build' , value: buildNum) \
    110                 ],                                                              \
    111                 propagate: false
     96//Helper routine to collect information about the git history
     97def collect_git_info() {
    11298
    113         echo(result.result)
     99        //create the temporary output directory in case it doesn't already exist
     100        def out_dir = pwd tmp: true
     101        sh "mkdir -p ${out_dir}"
    114102
    115         if(result.result != 'SUCCESS') {
    116                 sh("wget -q -O - https://cforall.uwaterloo.ca/jenkins/job/Cforall_Distribute_Ref/${result.number}/consoleText")
    117                 error(result.result)
     103        //parse git logs to find what changed
     104        dir("../Cforall_Full_Build@script") {
     105                sh "git reflog > ${out_dir}/GIT_COMMIT"
    118106        }
     107        git_reflog = readFile("${out_dir}/GIT_COMMIT")
     108        gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1]
     109        gitRefNewValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][2]
    119110}
    120111
Note: See TracChangeset for help on using the changeset viewer.