-
Notifications
You must be signed in to change notification settings - Fork 402
Open
Description
Hi there!
In my code, I've something like that
withCredentials([usernamePassword(
credentialsId: github_credentials_id,
passwordVariable: 'GITHUB_PASSWORD',
usernameVariable: 'GITHUB_USER')
]) {
sh(script: """
#!/bin/bash
git clone --single-branch --branch master https://\$GITHUB_USER:\$GITHUB_PASSWORD@github.com/<REPO-NAME>.git <REPO-BRANCH>
)
}I'm using JenkinsPipelineUnit to test my custom groovy functions. Tests are passing fine when running with JenkinsPipelineUnit up to v1.3.
Starting from v1.4, tests are failing with the following errors
groovy.lang.MissingMethodException:
No signature of method: groovy.lang.Binding.setVariable() is applicable for argument types: (LinkedHashMap, String) values: [[credentialsId:<ID>, passwordVariable:GITHUB_PASSWORD, ...], ...]
Possible solutions: getVariable(java.lang.String), setVariable(java.lang.String, java.lang.Object), getVariables(), hasVariable(java.lang.String)
at xxx.groovy:40)
for v1.4 and v1.5. While starting from v1.6
groovy.lang.MissingMethodException:
No signature of method: groovy.lang.Binding.setVariable() is applicable for argument types: (ArrayList, String) values: [[GITHUB_USER, GITHUB_PASSWORD], USERNAME:PASSWORD]
Possible solutions: getVariable(java.lang.String), setVariable(java.lang.String, java.lang.Object), getVariables(), hasVariable(java.lang.String)
at xxx.groovy:58)
I checked credentials-binding the documentation, and my code seems ok.
Do you have any suggestion?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels