-
Bug
-
Resolution: Unresolved
-
Minor
-
None
If you put credentials inside of a folder, and use them in the job configuration page it will produce the error:
Failure javax.security.auth.login.CredentialNotFoundException: CREDENTIAL_HASH_VALUE at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSClientFactory.lookupNamedCredential(AWSClientFactory.java:105) at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSClientFactory.getClientFactory(AWSClientFactory.java:86) at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder$DescriptorImpl.doValidateCredentials(AWSEBDeploymentBuilder.java:285) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
If you trigger a new build with those same credentials it throws the error:
Started by user Steven Building on master in workspace /tmp FATAL: Deployment Failure java.io.IOException: Deployment Failure at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:166) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Caused by: javax.security.auth.login.CredentialNotFoundException: CREDENTIALS_HASH_VALUE at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSClientFactory.lookupNamedCredential(AWSClientFactory.java:105) at br.com.ingenieux.jenkins.plugins.awsebdeployment.DeployerRunner.perform(DeployerRunner.java:59) at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:162) ... 9 more Finished: FAILURE
I think the issue is AWSClientFactory.lookupNamedCredential does not properly search inside of folders and only at the root level of the Jenkins instance. The credentials from the root level works, however anything inside of folders will fail with the above exception.
Steps to reproduce issue:
1. Create a folder and add the credentials inside the folder.
2. Create a job inside the folder.
3. Configure the job to use the credentials inside the folder.
4. Clicking "Test Connection" button will fail with the above exception.
5. Clicking "Build now" will also trigger the same error message.
- links to