Changeset c8c03683 for Jenkinsfile


Ignore:
Timestamp:
Jun 14, 2016, 12:53:26 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
7ff30d07
Parents:
e04ef3a (diff), d14d96a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    re04ef3a rc8c03683  
    3636
    3737def push_build() {
    38         build_stage 'Push'
    39 
    40                 sh 'git remote add DoLang git@gitlab.do-lang.org:internal/cfa-cc.git'
    41                 sh 'git push DoLang master'
     38        //Don't use the build_stage function which outputs the compiler
     39        stage 'Push'
     40
     41                status_prefix = 'Push'
     42
     43                def out_dir = pwd tmp: true
     44                sh "mkdir -p ${out_dir}"
     45
     46                //parse git logs to find what changed
     47                sh "git remote > ${out_dir}/GIT_REMOTE"
     48                git_remote = readFile("${out_dir}/GIT_REMOTE")
     49                remoteDoLangExists = git_remote.contains("DoLang")
     50
     51                if( !remoteDoLangExists ) {
     52                        sh 'git remote add DoLang git@gitlab.do-lang.org:internal/cfa-cc.git'
     53                }
     54
     55                sh "git push DoLang ${gitRefNewValue}:master"
    4256}
    4357
     
    7488def collect_git_info() {
    7589
     90        //create the temporary output directory in case it doesn't already exist
    7691        def out_dir = pwd tmp: true
     92        sh "mkdir -p ${out_dir}"
     93
     94        //parse git logs to find what changed
    7795        gitRefName = env.BRANCH_NAME
    7896        dir("../${gitRefName}@script") {
     
    89107node ('master'){
    90108
     109        boolean doPromoteBuild2DoLang
    91110        def err = null
    92111        def log_needed = false
     
    113132                                        ]])
    114133
    115                                 echo "FULL BUILD = ${promoteBuild2DoLang}"
     134                                doPromoteBuild2DoLang = promoteBuild2DoLang == 'true'
     135
     136                                echo "FULL BUILD = ${doPromoteBuild2DoLang}"
    116137
    117138                                //Compile using gcc-4.9
     
    127148                                cfa_build()
    128149
    129                                 if(promote_build) {
     150                                if( doPromoteBuild2DoLang ) {
    130151                                        push_build()
    131152                                }
     
    149170        finally {
    150171                //Send email with final results
    151                 notify_result(promote_build, err != null, currentBuild.result, log_needed)
     172                notify_result(doPromoteBuild2DoLang, err, currentBuild.result, log_needed)
    152173
    153174                /* Must re-throw exception to propagate error */
     
    161182//Routine responsible of sending the email notification once the build is completed
    162183//===========================================================================================================
    163 def promote_email(boolean promote, boolean success, String status, boolean log) {
     184def notify_result(boolean promote, Exception err, String status, boolean log) {
    164185        if(promote)     {
    165                 if( !success ) {
     186                if( err ) {
    166187                        promote_email(status)
    167188                }
Note: See TracChangeset for help on using the changeset viewer.