Changeset c7449ce2 for Jenkinsfile


Ignore:
Timestamp:
Jun 6, 2016, 12:07:38 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
de62f0f0
Parents:
86242b0
Message:

Testing Jenkinsfile which runs git reflog in the correct directory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    r86242b0 rc7449ce2  
    7171        def err = null
    7272        def log_needed = false
    73         currentBuild.result = "SUCCESS"
     73        currentBuild.result = "FAILURE"
     74        status_prefix = ''
    7475
    7576        //Properties sent by the git-hooks (ref name, latest commit hash, previous commit hash)
     
    8182
    8283        try {
    83 
    84                 sh 'git reflog > GIT_COMMIT'
    85                 git_reflog = readFile('GIT_COMMIT')
     84                def out_dir = pwd tmp: true
    8685                gitRefName = env.BRANCH_NAME
     86                dir("../${gitRefName}@script") {
     87                        sh "git reflog > ${out_dir}/GIT_COMMIT"
     88                }
     89                git_reflog = readFile('${out_dir}/GIT_COMMIT')
    8790                gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1]
    8891                gitRefNewValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][2]
     
    115118                }
    116119
     120                currentBuild.result = "SUCCESS"
    117121        }
    118122
Note: See TracChangeset for help on using the changeset viewer.