jenkins/update2head: skip push if nothing available to commit
BugzID_ 73789 Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
This commit is contained in:
parent
664c1f68d5
commit
154496719e
|
|
@ -107,5 +107,10 @@ def commitChanges(isNmUpdate, isCommunityUpdate) {
|
|||
if(isCommunityUpdate) { updatedLayers += "community" }
|
||||
sh(script: "git checkout ${env.BRANCH_NAME}")
|
||||
sh(script: "git add -u")
|
||||
stagedData = sh(returnStdout: true, script: "git diff --cached").trim()
|
||||
if("${stagedData}" == "") {
|
||||
println "everything up to date, nothing to commit"
|
||||
return
|
||||
}
|
||||
sh(script: "git commit -m \"submodules: updated ${updatedLayers} hashes, triggered by ${env.TRIGGERED_USER}\" && git push")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue