-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins ver. 2.150.3
Credentials Plugin 2.1.18
I've updated my Jenkins installation to 2.150 and also plugins. I've set Gitlab token in Jenkins configuration and connection works without problem when I click on "Test connection" button.
When I launch a pipeline Job, repository is correctly pulled but I've the following warning in console output:
Warning: CredentialId "RENO-Gitlab" could not be found.
Here is my pipeline code:
checkout([ $class: 'GitSCM', branches: [[name: "origin/dev"]], userRemoteConfigs: [[credentialsId: 'RENO-Gitlab', url: 'git@mygitlab.group/project.git']] ])
So the Job starts well and works but this warning is displayed.
FWIW: I was seeing a similar problem and changing to double quotes for the credentials parm did the trick.
This issued a 'Warning: CredentialId "${gitCredentials}" could not be found.'
git changelog: false, poll: false,
{{ url: 'https://github.com/genexuslabs/PlanCoronaVirus.git',}}
credentialsId: '${gitCredentials}'
Seeing that the environment variable wasn't resolved was a hint. This works ok:
git changelog: false, poll: false,
{{ url: 'https://github.com/genexuslabs/PlanCoronaVirus.git',}}
credentialsId: "${gitCredentials}"