-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
OS X + Docker
When I run a Jenkinsfile that uses withCredentials, the credentials are not found, even though they exist.
Command:
docker run --rm -v $(pwd):/workspace -v /tmp/jenkins:/app/jenkins -v /tmp/jenkins_home/plugins:/usr/share/jenkins/ref/plugins jenkinsfile-runner
Output:
15.130 [id=1] WARNING j.branch.WorkspaceLocatorImpl#getWorkspaceRoot: JENKINS-2111 path sanitization ineffective when using legacy Workspace Root Directory ‘/build’; switch to ‘${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}’ as in JENKINS-8446 / JENKINS-21942
Started
Running in Durability level: PERFORMANCE_OPTIMIZED
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /build
[Pipeline]
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Could not find credentials entry with ID 'trose'
Jenkinsfile:
node {
withCredentials([ usernamePassword(credentialsId: 'trose', usernameVariable: 'user',
passwordVariable: 'pass') ])
}
From <JENKINS_HOME>/credentials.xml:
<com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl>
<scope>GLOBAL</scope>
<id>trose</id>
<description></description>
<username>trose</username>
<password>{AQAAABAAAAAQ25ldSmp9SUMhWS7u0mODZvmd+lh3ubJx0V7XCSxolTU=} </password>
</com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl>