Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61999

If scm fails, credentials are not populated in post-build steps

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins ver. 2.176.3 & Jenkins ver. 2.222.1

      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.

            Unassigned Unassigned
            ovianao o viana
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: