-
Bug
-
Resolution: Won't Do
-
Critical
-
None
-
Linux
Jenkins: 2.263.1
Relevant plugins: latest version
I just found that in jobs (created from Job-DSL code if that matters), the Gradle plugin behaves differently depending on whether a Mercurial checkout using the Subdirectory setting is used with plain SCM vs. MultiSCM. Here's a simplified example:
job('./MultiSCMTest') { multiscm { hg(repoUrl) { branch('default') clean(true) installation('Mercurial') subdirectory('repo') } } triggers { scm('H/15 * * * *') } steps { gradle { passAllAsProjectProperties(false) passAllAsSystemProperties(false) rootBuildScriptDir('repo') switches('') tasks('clean --no-daemon') useWorkspaceAsHome(true) } } }
Executing the resulting job yields the expected result (the Gradle wrapper contained in the repository is executed successfully, like:
[Gradle] - Launching build. [repo] $ /srv/jenkins/workspace/MultiSCMTest/repo/gradlew clean --no-daemon
However, if I change "multiscm" to just "scm", the build runs into an error:
[Gradle] - Launching build. FATAL: The Gradle wrapper has not been found in these directories: /srv/jenkins/workspace/MultiSCMTest/repo/repo
Notice the doubled "/repo" at the end of the path. I'd expect both to behave identically.