我正在定义一个带有许多输入的脚本化管道,其中两个是凭据。在UI中,我可以看到如何添加作为凭据的输入,但我找不到有关如何为脚本化管道定义凭据参数的任何信息。我的参数定义如下:
properties([
buildDiscarder(logRotator(numToKeepStr: '20')),
parameters([
stringParam(name: 'export_credentials'),
stringParam(name: 'import_credentials'),
]),
])
但我更希望它是实际的凭据参数,而不是字符串参数
2条答案
按热度按时间70gysomp1#
要确保字符串的安全,请使用以下方法:
zlwx9yxi2#
在研究了job-dsl插件API(/plugin/job-dsl/api-viewer/index.htm)之后,我发现了这<jenkins_url>一点: