Changes in / [34dcc78c:a9a1d06]
- Location:
- Jenkins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkins/Distribute
r34dcc78c ra9a1d06 32 32 SrcDir = pwd tmp: false 33 33 34 Tools. clean()34 Tools.Clean() 35 35 36 Tools. checkout( commit )36 Tools.Checkout( commit ) 37 37 } 38 38 … … 45 45 //If an exception is caught we need to change the status and remember to 46 46 //attach the build log to the email 47 catch (Exception caughtError) {47 // catch (Exception caughtError) { 48 48 // //rethrow error later 49 49 // err = caughtError … … 56 56 // //Store the result of the build log 57 57 // currentBuild.result = "${StageName} FAILURE".trim() 58 }58 // } 59 59 60 60 finally { -
Jenkins/tools.groovy
r34dcc78c ra9a1d06 24 24 // Common compilation routines 25 25 //=========================================================================================================== 26 def clean() {26 def Clean() { 27 27 BuildStage('Cleanup', true) { 28 28 // clean the build by wipping the build directory … … 33 33 } 34 34 35 def checkout(commitHash = null) {35 def Checkout(commitHash = null) { 36 36 BuildStage('Checkout', true) { 37 37 //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 { 39 42 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 } 41 46 } 42 47 }
Note: See TracChangeset
for help on using the changeset viewer.