Changeset 0a346e5


Ignore:
Timestamp:
Jun 20, 2016, 1:05:30 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:
21eb693
Parents:
b3ac2d6b
Message:

Added some error handling to Jenkinsfile to try and prevent more silent errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    rb3ac2d6b r0a346e5  
    234234        def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase()
    235235
    236         sh "git rev-list --format=short ${gitRefOldValue}...${gitRefNewValue} > GIT_LOG"
    237         def gitLog = readFile('GIT_LOG')
    238 
    239         sh "git diff --stat ${gitRefNewValue} ${gitRefOldValue} > GIT_DIFF"
    240         def gitDiff = readFile('GIT_DIFF')
     236        def gitLog = 'Error retrieving git logs'
     237        def gitDiff = 'Error retrieving git diff'
     238
     239        try {
     240
     241                sh "git rev-list --format=short ${gitRefOldValue}...${gitRefNewValue} > GIT_LOG"
     242                gitLog = readFile('GIT_LOG')
     243
     244                sh "git diff --stat ${gitRefNewValue} ${gitRefOldValue} > GIT_DIFF"
     245                gitDiff = readFile('GIT_DIFF')
     246        }
     247        catch (Exception error) {}
    241248
    242249        def email_subject = "[${project_name} git][BUILD# ${env.BUILD_NUMBER} - ${status}] - branch ${env.BRANCH_NAME}"
Note: See TracChangeset for help on using the changeset viewer.