fetch branches before master checkout

This commit is contained in:
Sebastian Sdorra
2020-03-13 07:51:07 +01:00
parent 7f24fc8c9c
commit d64827fc8a

4
Jenkinsfile vendored
View File

@@ -47,6 +47,10 @@ node('docker') {
// commit changes
sh "git -c user.name='CES Marvin' -c user.email='cesmarvin@cloudogu.com' commit -m 'release version ${releaseVersion}'"
// we need to fetch all branches, so we can checkout master and develop later
sh "git config 'remote.origin.fetch +refs/heads/*:refs/remotes/origin/*'"
sh "git fetch --all"
// merge release branch into master
sh "git checkout master"
sh "git merge --ff-only ${env.BRANCH_NAME}"