drscream / bamboozled-ruby-plugin

Bamboozled Ruby Plugin for Atlassian Bamboo continuous integration/continuous deployment
Other
24 stars 9 forks source link

Deploy using elastic agent fails - NullPointerException #14

Open Jimflip opened 8 years ago

Jimflip commented 8 years ago

Hi

Deploy jobs fail when using elastic agents.

Thanks, Jim

java.lang.NullPointerException
    at com.alienfast.bamboozled.ruby.tasks.AbstractRubyTask.resolveContext(AbstractRubyTask.java:137)
    at com.alienfast.bamboozled.ruby.tasks.AbstractRubyTask.execute(AbstractRubyTask.java:74)
    at com.atlassian.bamboo.task.TaskExecutorImpl$3.call(TaskExecutorImpl.java:288)
    at com.atlassian.bamboo.task.TaskExecutorImpl$3.call(TaskExecutorImpl.java:284)
    at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:200)
    at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:284)
    at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:106)
    at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:75)
    at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:196)
    at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:124)
    at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:115)
    at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215)
    at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:114)
    at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:118)
    at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
    at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
    at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
    at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
    at java.lang.Thread.run(Thread.java:745)
rosskevin commented 8 years ago

I've not used elastic agents but do have remote agents running. What version of bamboo are you running? It appears to be a problem obtaining a deployment service.

Jimflip commented 8 years ago

tested this on 5.9.7 and 5.7.x with no joy.

Jimflip commented 8 years ago

I suspect setDeploymentProjectService() is not being called for some reason.

rosskevin commented 8 years ago

I'm not going to have much time to put to this, if you want to submit a pull request that would be great. If you don't have your development environment setup, I can even do some builds for you if you want to send me a snippet of code and I can post you a build link to attempt. I'm just swamped with other things right now...