Jenkinsfile_update2head: checkout branch before committing
the job is performing a swallowed checkout which leads to a detached HEAD. Thus the branch need to be checked out before committing and pushing BugzID: 74574 Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
This commit is contained in:
parent
24866de9a0
commit
bf7d5e86a4
|
|
@ -100,6 +100,7 @@ def commitChanges(isNmUpdate, isCommunityUpdate) {
|
|||
if(isNmUpdate) { updatedLayers += "netmodule"}
|
||||
if(isNmUpdate && isCommunityUpdate) { updatedLayers += " and " }
|
||||
if(isCommunityUpdate) { updatedLayers += "community" }
|
||||
sh(script: "git checkout ${env.BRANCH_NAME}")
|
||||
sh(script: "git add -u")
|
||||
sh(script: "git commit -m \"submodules: updated ${updatedLayers} hashes, triggered by ${env.TRIGGERED_USER}\" && git push")
|
||||
}
|
||||
Loading…
Reference in New Issue