pipeline {
agent any
environment {
GITLAB_API_TOKEN = credentials('tokentest')
}
stages {
stage('Hello') {
steps {
echo 'Hello World'
}
}
}
}
ERROR: No suitable binding handler could be found for type com.dabsquared.gitlabjenkins.connection.GitLabApiTokenImpl. Supported types are StandardUsernamePasswordCredentials,FileCredentials,DockerServerCredentials,StringCredentials,SSHUserPrivateKey.
Jenkins and plugins versions report
Follow-up to #536 and #1754
The withCredentials() syntax does work indeed in pipelines thanks to this MR, but the credentials() one doesn't.
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Rocky Linux 9
Reproduction steps
Sample pipeline:
Expected Results
Token injected as GITLAB_API_TOKEN
Actual Results
Error message:
Anything else?
No response
Are you interested in contributing a fix?
No response