通过JobDSL插件创建StringCredentials类型的证书,绑定到文件夹

问题描述 投票:0回答:1

我正在运行Jenkins 2.204.5带有插件:-Job-dsl v1.77-凭据1.7

我正在尝试使用JobDSL插件代码创建绑定到文件夹的'Secret Text'或'StringCredentialsImpl'类型的机密。https://github.com/jenkinsci/plain-credentials-plugin/blob/master/src/main/java/org/jenkinsci/plugins/plaincredentials/impl/StringCredentialsImpl.java

但是,尽管它在https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/parameter/CredentialsParameterContext.groovy#L23

我在动态查看器JENKINS_URL / plugin / job-dsl / api-viewer / index.html中看不到它我所看到的是:

credentials {
basicSSHUserPrivateKey {}
certificateCredentialsImpl {}
fileSystemServiceAccountCredential {}
// OpenShift do use a dedicated authorization layer on top of Kubernetes and does not allow to access Kubernetes API using plain username/password credentials.
openShiftBearerTokenCredentialImpl {}
usernamePasswordCredentialsImpl {}
}
jenkins jenkins-plugins jenkins-job-dsl
1个回答
0
投票

显然,plain-credentials-plugin毕竟与job-dsl-plugin不兼容。

Jenkins错误:https://issues.jenkins-ci.org/browse/JENKINS-59971

© www.soinside.com 2019 - 2024. All rights reserved.