拥有一个由Jenkins Worflow Plugin执行的 groovy 脚本。
如文档所述,到目前为止,git 步骤只有基本配置,只有一个 url 参数,建议对更复杂的事情使用通用 checkout scm 步骤。
有了这个,就可以像这样传递credentialsId:
checkout scm: [$class: 'MercurialSCM', source: 'ssh://hg@bitbucket.org/user/repo', clean: true, credentialsId: '1234-5678-abcd']
但是如何使用 SSH 密钥凭证来代替它呢?