Jenkins:mercurial scm:clean=false 没有按预期工作
Jenkins: mercurial scm: clean=false is not working as expected
编辑: 似乎 MercurialSCM 插件硬编码 update
以使用 --clean
选项。参见 this line。有人有什么想法吗?
我的 Jenkinsfile 中有以下结帐步骤:
checkout([
scm: [
$class: "MercurialSCM",
source: "ssh://hg@bitbucket.org/xxxxx/${repo}",
credentialsId: "jenkins",
revision: params[branch] ? params[branch] : "default",
subdir: (repo == "f8_root") ? "" : "aarch64/${repo}",
clean: false,
],
poll: true,
])
clean
的参数设置为 false
。但是,该插件似乎仍然使用 --clean
选项发出 update
。来自日志:
[Pipeline] checkout
[f8_fw] $ hg showconfig paths.default
[f8_fw] $ hg pull --rev feature/test-framework
pulling from ssh://hg@bitbucket.org/doblesc/f8_fw
no changes found
[f8_fw] $ hg update --clean --rev feature/test-framework
我该如何解决这个问题?
似乎 --clean
被硬编码到 MercurialSCM Jenkins 插件中。
参见 link to the culprit code 的 OP。
我打开了一个ticket on Jenkins jira。
编辑: 似乎 MercurialSCM 插件硬编码 update
以使用 --clean
选项。参见 this line。有人有什么想法吗?
我的 Jenkinsfile 中有以下结帐步骤:
checkout([
scm: [
$class: "MercurialSCM",
source: "ssh://hg@bitbucket.org/xxxxx/${repo}",
credentialsId: "jenkins",
revision: params[branch] ? params[branch] : "default",
subdir: (repo == "f8_root") ? "" : "aarch64/${repo}",
clean: false,
],
poll: true,
])
clean
的参数设置为 false
。但是,该插件似乎仍然使用 --clean
选项发出 update
。来自日志:
[Pipeline] checkout
[f8_fw] $ hg showconfig paths.default
[f8_fw] $ hg pull --rev feature/test-framework
pulling from ssh://hg@bitbucket.org/doblesc/f8_fw
no changes found
[f8_fw] $ hg update --clean --rev feature/test-framework
我该如何解决这个问题?
似乎 --clean
被硬编码到 MercurialSCM Jenkins 插件中。
参见 link to the culprit code 的 OP。
我打开了一个ticket on Jenkins jira。