| https://stackoverflow.com/questions/60830533/create-credential-of-type-stringcredentials-bound-to-a-folder-via-jobdsl-plugi 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 {} }}} This looks like a bug, because the plain-credentials-plugin has the DataBoundConstructor Please take a look. |