-
Bug
-
Resolution: Unresolved
-
Major
-
None
It's not possible to use withCredentials in a jenkins pipeline to load the credentials setup for gitea-plugin.
The credentials are working as they should. It's just the following that isn't possible:
Pipeline:
environment {
GITEA_TOKEN = credentials('gitea-credentials')
}
Result:
ERROR: No suitable binding handler could be found for type org.jenkinsci.plugin.gitea.credentials.PersonalAccessTokenImpl. Supported types are StandardUsernamePasswordCredentials,FileCredentials,StringCredentials,DockerServerCredentials,SSHUserPrivateKey.
Pipeline:
withCredentials([[$class: "org.jenkinsci.plugin.gitea.credentials.PersonalAccessTokenImpl", credentialsId: 'gitea-credentials', variable: 'token']])
Result:
java.lang.ClassCastException: org.jenkinsci.plugin.gitea.credentials.PersonalAccessTokenImpl cannot be cast to org.jenkinsci.plugins.credentialsbinding.MultiBinding