| I was able to work around this bug using the configure option for string creds.
properties {
folderCredentialsProperty {
domainCredentials {
domainCredentials {
domain {
name('')
description('')
}
}
}
}
}
configure { folder ->
def configNode = folder / 'properties' / 'com.cloudbees.hudson.plugins.folder.properties.FolderCredentialsProvider_-FolderCredentialsProperty' / 'domainCredentialsMap' / 'entry' / 'java.util.concurrent.CopyOnWriteArrayList'
configNode << 'org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl'(plugin: 'plain-credentials@1.5') {
id('secret-id')
description('secret desc')
secret(hudson.util.Secret.fromString('secret').getEncryptedValue())
}
}
Unfortunately, I still cannot get file creds to work properly. It requires using com.cloudbees.plugins.credentials.SecretBytes, but attempting to do so gives all sorts of bizarre errors, like unable to resolve class com.cloudbees.plugins.credentials.SecretBytes or No such property: cloudbees for class: java.lang.String. |