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

CredentialNotFoundException from downstream job using user scope credentials

XMLWordPrintable

      Jenkins ver. 2.60.2

      Authorize Project Plugin ver. 1.3.0

      Credentials plugin ver. 2.1.14

      Steps to reproduce:

      1. Add some user scope credentials using credential plugin e.g. "user-pass"

      2. Create 2 parameterized jobs e.g."main" and "downstream" with the same credentials type parameter "user-pass"

      3. add "trigger/call build on other projects". set Project to build: "downstream" job. and set parameters "current build parameters"

      4. Configure "Configure Build Authorization" for both jobs, set "Run as user who triggered the build"

      5. start "main" job, specify "user-pass" parameter using user scope credentials

      6. The build will fail, check "downstream" job logs:

       

      Started by upstream project "GENERIC_BUILDS/webconsole/configure" build number 83
      originally caused by:
      Started by user Oleg Pershin
      Running as Oleg Pershin

      ...

      FATAL: ${user-pass}
      org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: ${user-pass}
      at org.jenkinsci.plugins.credentialsbinding.MultiBinding.getCredentials(MultiBinding.java:153)
      at org.jenkinsci.plugins.credentialsbinding.impl.UsernamePasswordMultiBinding.bind(UsernamePasswordMultiBinding.java:76)
      at org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper.setUp(SecretBuildWrapper.java:96)
      at hudson.model.Build$BuildExecution.doRun(Build.java:157)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490)
      at hudson.model.Run.execute(Run.java:1735)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:405)
      Notifying upstream projects of job completion
      Finished: FAILURE

       

       

            spender0 Oleg Pershin
            spender0 Oleg Pershin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: