Changes in / [34dcc78c:a9a1d06]


Ignore:
Location:
Jenkins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/Distribute

    r34dcc78c ra9a1d06  
    3232                                SrcDir    = pwd tmp: false
    3333
    34                                 Tools.clean()
     34                                Tools.Clean()
    3535
    36                                 Tools.checkout( commit )
     36                                Tools.Checkout( commit )
    3737                        }
    3838
     
    4545        //If an exception is caught we need to change the status and remember to
    4646        //attach the build log to the email
    47         catch (Exception caughtError) {
     47        // catch (Exception caughtError) {
    4848                // //rethrow error later
    4949                // err = caughtError
     
    5656                // //Store the result of the build log
    5757                // currentBuild.result = "${StageName} FAILURE".trim()
    58         }
     58        // }
    5959
    6060        finally {
  • Jenkins/tools.groovy

    r34dcc78c ra9a1d06  
    2424// Common compilation routines
    2525//===========================================================================================================
    26 def clean() {
     26def Clean() {
    2727        BuildStage('Cleanup', true) {
    2828                // clean the build by wipping the build directory
     
    3333}
    3434
    35 def checkout(commitHash = null) {
     35def Checkout(commitHash = null) {
    3636        BuildStage('Checkout', true) {
    3737                //checkout the source code and clean the repo
    38                 final scmVars = ref ? checkout scm : checkout([$class: 'GitSCM', branches: [[name: commitHash ]]])
     38                if(commitHash) {
     39                        final scmVars = checkout([$class: 'GitSCM', branches: [[name: commitHash ]]])
     40                        echo GitLogMessage(scmVars.GIT_COMMIT, scmVars.GIT_PREVIOUS_COMMIT)
     41                } else {
    3942
    40                 echo GitLogMessage(scmVars.GIT_COMMIT, scmVars.GIT_PREVIOUS_COMMIT)
     43                        final scmVars = checkout scm
     44                        echo GitLogMessage(scmVars.GIT_COMMIT, scmVars.GIT_PREVIOUS_COMMIT)
     45                }
    4146        }
    4247}
Note: See TracChangeset for help on using the changeset viewer.