Hi, we have a groovy script that we call with the Job DSL plugin which imports some classes from the Credentials plugin:
import com.cloudbees.plugins.credentials.CredentialsProvider
import com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
...
This works fine in version 1.44 of the Job DSL plugin, but the moment I upgrade to the latest version 1.48 I start getting errors:
Processing DSL script develop.groovy
ERROR: startup failed:
workspace:/jobs/SaltTests.groovy: 1: unable to resolve class com.cloudbees.plugins.credentials.CredentialsProvider
@ line 1, column 1.
import com.cloudbees.plugins.credentials.CredentialsProvider
^
workspace:/jobs/SaltTests.groovy: 2: unable to resolve class com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
@ line 2, column 1.
import com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
^
2 errors
I've done some searching here and in the release notes and could not find anything related.
I also noticed this warning message in the Jenkins plugin management page, but I am not sure if it is related?
Warning: the new version of this plugin claims to use a different settings format than the installed version. Jobs using this plugin may need to be reconfigured, and/or you may not be able to cleanly revert to the prior version without manually restoring old settings. Consult the plugin release notes for details.
How can I import these classes using the 1.48 version of the Job DSL plugin?
Any ideas on what is going on?
Thanks,
James