From bf7d5e86a4710e8be11cd52fbfa20f4230c104eb Mon Sep 17 00:00:00 2001 From: Marc Mattmueller Date: Tue, 6 Jul 2021 16:41:44 +0200 Subject: [PATCH] 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 --- Jenkinsfile_update2head | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile_update2head b/Jenkinsfile_update2head index 6526c1f..1b519fc 100644 --- a/Jenkinsfile_update2head +++ b/Jenkinsfile_update2head @@ -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") } \ No newline at end of file