0
votes

I'm running Jenkins 2.204.5
With plugins:
- job-dsl v1.77
- credentials 1.7

I'm trying to create a secret of type 'Secret Text' or 'StringCredentialsImpl' bound to a folder, using the JobDSL plugin code. https://github.com/jenkinsci/plain-credentials-plugin/blob/master/src/main/java/org/jenkinsci/plugins/plaincredentials/impl/StringCredentialsImpl.java

But despite the fact that it is mentioned as supported in https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/parameter/CredentialsParameterContext.groovy#L23

I cant see it in my dynamic viewer JENKINS_URL/plugin/job-dsl/api-viewer/index.html All I see is:

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 {}
}
1

1 Answers

1
votes

Apparently the plain-credentials-plugin is after all not compatible with the job-dsl-plugin.

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