首页 > 解决方案 > 詹金斯:mercurial scm:clean = false 没有按预期工作

问题描述

编辑:似乎 MercurialSCM 插件update对使用该--clean选项进行了硬编码。看到这条线。任何人有任何想法是什么想法?

我的 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设置为falseupdate但是,该插件似乎仍然发出--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

我怎样才能解决这个问题?

标签: jenkinsmercurialjenkins-pipelinejenkins-plugins

解决方案


似乎--clean被硬编码到 MercurialSCM Jenkins 插件中。

有关罪魁祸首代码的链接,请参见 OP 。

在 Jenkins jira 上开了一张票


推荐阅读