jenkinsci / jenkinsci/credentials-binding-plugin
[JENKINS-61999] If scm fails, credentials are not populated in post-build steps
- Dominant language
- Java
- Stars
- 57
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
Searched high-and-low for this, but couldn't find anything.
How to reproduce:
1. Create a freestyle project.
2. Set the project to check out from a bogus github repo that you can never reach.
3. Add a credentials binding for the job (in my case, Separated Username and Password).
4. Add a simple post-build step via the PostBuildScript Plugin to use the credentials defined in #3 (such as echo-ing the credentials).
5. Execute the job.
6. Set the project to check out from a legitimate github repo that you can access.
7. Re-execute the job.
Actual:
5. Post-build step can't use the credentials as they're empty.
7. Post-build step can use the credentials as they're not empty.
Expected:
Post-build step should still have access to the credentials, even if the scm step fails.
---
Originally reported by ovianao, imported from: If scm fails, credentials are not populated in post-build steps
Raw content of original issue
Searched high-and-low for this, but couldn't find anything.
How to reproduce:
1. Create a freestyle project.
2. Set the project to check out from a bogus github repo that you can never reach.
3. Add a credentials binding for the job (in my case, Separated Username and Password).
4. Add a simple post-build step via the PostBuildScript Plugin to use the credentials defined in #3 (such as echo-ing the credentials).
5. Execute the job.
6. Set the project to check out from a legitimate github repo that you can access.
7. Re-execute the job.Actual:
5. Post-build step can't use the credentials as they're empty.
7. Post-build step can use the credentials as they're not empty.Expected:
Post-build step should still have access to the credentials, even if the scm step fails.
- environment:
Jenkins ver. 2.176.3 & Jenkins ver. 2.222.1
Contributor guide
Assessment
This issue has not been assessed yet.