[release] force the checkokut
@@ -217,7 +217,7 @@ pipeline {
// restore git state before updating .x branch, otherwise later external scripts will use
// the version when the tag was created, which might not match the release branch state
sh(label: "remote branch is fetched for local checkout", script: "git fetch origin ${BRANCH_SPECIFIER}")
- sh(label: "restore to previous updating version", script: "git checkout --track origin/${BRANCH_SPECIFIER}")
+ sh(label: "restore to previous updating version", script: "git checkout --track origin/${BRANCH_SPECIFIER} --force")
}
}
}
@@ -261,10 +261,8 @@ pipeline {
steps {
dir("${BASE_DIR}"){
// ensure that we don't rely on side effect of another step
- sh(script: """
- git fetch origin ${BRANCH_SPECIFIER} # ensure remote branch is fetched for local checkout
- git checkout --track origin/${BRANCH_SPECIFIER}
- """)
+ sh(label: "remote branch is fetched for local checkout", script: "git fetch origin ${BRANCH_SPECIFIER}")
+ sh(label: "restore to previous updating version", script: "git checkout --track origin/${BRANCH_SPECIFIER} --force")
sh(script: "./scripts/jenkins/update_cloudfoundry.sh ${RELEASE_VERSION}")
gitPush()
}
