詹金斯:Mercurial scm:clean = false无法正常工作

时间:2019-01-30 16:11:21

标签: jenkins mercurial jenkins-pipeline jenkins-plugins

编辑:似乎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。但是,该插件似乎仍然使用update选项发出--clean。从日志中:

[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

我该如何解决?

1 个答案:

答案 0 :(得分:1)

好像--clean被硬编码到MercurialSCM Jenkins插件中。

有关this post的信息,请参见OP。

我打开了link to the culprit code

相关问题