Workaround for Jenkins issue
*steps to reproduce*:
it failed only when set
withMerge policy
``
try {
stage(“Checkout”) {
gerrit.gerritPatchsetCheckout([
credentialsId: CREDENTIALS_ID,
*withMerge: true*,
])
}``
proofs: https://ci.mcp.mirantis.net/view/MAP/job/map-build-component-image/5/console
root cause - incorrect case-resolving in git plugin
related issue: https://issues.jenkins-ci.org/browse/JENKINS-51638
p.s. workaround in comments
Change-Id: I9ffd85a61613eecaeb96fbacb1a28bb6a37cb60f
diff --git a/src/com/mirantis/mk/Gerrit.groovy b/src/com/mirantis/mk/Gerrit.groovy
index 99c91b7..d1c0a1c 100644
--- a/src/com/mirantis/mk/Gerrit.groovy
+++ b/src/com/mirantis/mk/Gerrit.groovy
@@ -76,7 +76,7 @@
// if we need to "merge" code from patchset to GERRIT_BRANCH branch
if (merge) {
- scmExtensions.add([$class: 'PreBuildMerge', options: [fastForwardMode: 'FF', mergeRemote: 'gerrit', mergeStrategy: 'default', mergeTarget: gerritBranch]])
+ scmExtensions.add([$class: 'PreBuildMerge', options: [fastForwardMode: 'FF', mergeRemote: 'gerrit', mergeStrategy: 'DEFAULT', mergeTarget: gerritBranch]])
}
// we need wipe workspace before checkout
if (wipe) {
@@ -246,4 +246,4 @@
def missedParams = requiredParams - config.keySet()
def badParams = config.subMap(requiredParams).findAll{it.value in [null, '']}.keySet()
return badParams + missedParams
-}
\ No newline at end of file
+}