Have an issue with the Octopus plug-in for Bamboo. Octo.exe works to create releases but the “Octopus Deploy: Create Release” task does not work. Getting the following output.
Using Octopus Server v2019.9.10 LTS and the task tools for bamboo are version 2.3.0
Finished task com.atlassian.bamboo.plugins.scripttask:task.builder.script Octo Pack and Push
25-Nov-2019 15:13:43 Starting task 'Create and Deploy' of type 'com.octopus.bamboo:task.createrelease'
25-Nov-2019 15:13:43 Error occurred while running Task 'Create and Deploy(4)' of type com.octopus.bamboo:task.createrelease.
25-Nov-2019 15:13:43 java.lang.NullPointerException
25-Nov-2019 15:13:43 at com.octopus.bamboo.plugins.task.createrelease.CreateReleaseTask.execute(CreateReleaseTask.java:142)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:319)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:252)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:319)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:112)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:73)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:203)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:175)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:131)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:125)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:126)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
25-Nov-2019 15:13:43 at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
25-Nov-2019 15:13:43 at java.lang.Thread.run(Unknown Source)
25-Nov-2019 15:13:43 Finalising the build...
25-Nov-2019 15:13:43 Stopping timer.
25-Nov-2019 15:13:43 Build 19562500-19398661-44204060 completed.
Thanks for getting in touch. That error is referring to this line which seems to be indicating that the
deploymentTimeout value is somehow ending up null. I’ve tried to reproduce this in my test environment but haven’t been able to as yet.
What I have just noticed is that line is using
.isEmpty() rather than
StringUtil.isNotBlank, which is what we would normally using because it is null safe. I’ll change those calls and get a patched release to see if that resolves the issue.
In the meantime, would you be able to check what the progress setting look like in your Create Release step, and maybe post a screenshot here if there isn’t any sensitive information visible.
Let me know if you need more information.
Thank you for the information.
@Shannon_Lewis an update on this issue. Today I ran a deployment that had failed the day before and it worked today. I am not sure what is entirely going on.
We did notice some AD disruptions in addition to this error after an Octopus Server upgrade. We upgraded from 2018.9.0 -> 2019.9.10 LTS yesterday and I wonder if being behind so many versions caused some issues?
I did some more digging into what the Bamboo tasks look like for the Octopus Deploy Create Release task. The configuration is stored in the Bamboo database as XML. The tasks before did not have an element in the XML related to
You will notice that the
deploymentTimeout attribute has been added. To get this added I had to go into the specifc task and just click save again. Did not even have to touch anything else on the task.
@Shannon_Lewis can you also point me to where I could get the patch? I can not seem to find it. My guess is that the patch would fix this issue? Thanks in advance.
Right, so that data supports what we were seeing. Curious that it ended up with a value in my testing, I’m still not sure exactly why that was.
Apologies again about missing your PR, it was late here last night when I tested the change and I’d left the PR and build to do this morning. I put all of that through before I released your PR was there. It was good validation that we’d both made exactly the same change.
I’ve built and released
2.3.1 to the Atlassian marketplace this morning so you should be able to get the update from there.
Thank you again for your input and please let me know if you have any further trouble.
Thanks for the help @Shannon_Lewis. All the best!