Description
The error at the bottom of this issue is reported when running a job on a jenkins slave which uses the AWSEB plugin.
Looking at the diff from 0.3.19 to 0.3.20 it looks like the change in src/main/java/br/com/ingenieux/jenkins/plugins/awsebdeployment/AWSClientFactory.java
from using Jenkins.getInstance()
to Jenkins.get()
due to deprecation may be the issue.
Looking at https://javadoc.jenkins-ci.org/jenkins/model/Jenkins.html#getInstance--, I think this should be using Jenkins.getInstanceOrNull()
for this use case?
AWSEB Deployment Plugin Version 0.3.20 (aws-java-sdk version: 1.11.723) FATAL: Deployment Failure Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to EC2 (Jenkins EC2 slaves) - linux ubuntu16 large (i-xxxxxxxxxxxx) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1788) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356) at hudson.remoting.Channel$2.adapt(Channel.java:1033) at hudson.remoting.Channel$2.adapt(Channel.java:1029) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) at br.com.ingenieux.jenkins.plugins.awsebdeployment.DeployerRunner.perform(DeployerRunner.java:64) at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:243) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:79) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1856) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) java.lang.IllegalStateException: Jenkins.instance is missing. Read the documentation of Jenkins.getInstanceOrNull to see what you are doing wrong. at jenkins.model.Jenkins.get(Jenkins.java:779) at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSClientFactory.lookupNamedCredential(AWSClientFactory.java:95) at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSClientFactory.getClientFactory(AWSClientFactory.java:85) at br.com.ingenieux.jenkins.plugins.awsebdeployment.cmd.DeployerCommand$InitAWS.perform(DeployerCommand.java:143) at br.com.ingenieux.jenkins.plugins.awsebdeployment.cmd.DeployerChain.perform(DeployerChain.java:54) at br.com.ingenieux.jenkins.plugins.awsebdeployment.SlaveDeployerCallable.call(SlaveDeployerCallable.java:42) at br.com.ingenieux.jenkins.plugins.awsebdeployment.SlaveDeployerCallable.call(SlaveDeployerCallable.java:27) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused: java.util.concurrent.ExecutionException at hudson.remoting.Channel$2.adapt(Channel.java:1035) at hudson.remoting.Channel$2.adapt(Channel.java:1029) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) at br.com.ingenieux.jenkins.plugins.awsebdeployment.DeployerRunner.perform(DeployerRunner.java:64) at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:243) Caused: java.io.IOException: Deployment Failure at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:245) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:79) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1856) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428)