I am using a powershell script (deploy.ps1) to run a console application with dbup to upgrade my database. Like a number of other people have reported the task never finishes but all the updates are going thru ok.
So any fixes for this?
Thanks for reaching out. 95% of the cases where people report that a script never finishes, is because that script is somehow prompting the user for more info. Given that Octopus runs scripts from a service in a non-interactive way, the script simply gets stuck waiting for an input that’ll never arrive. It really is up to each developer to make those scripts\console apps in a way that they properly return an exit code once they are done with their work, so Octopus knows it has to move on.
Do you think this might be your case as well? If not, try sending us a deployment log where you are only running this DBUp step so we can get some context on what might be going on.
Hi Dalmiro and thanks for your reply.
I’m now feeling a bit ashamed. After reading (before posting this article) about issues with pending input, and then again reading your reply about pending input, I took another look for input-issues.
And you were absolutely correct, Console.Readline sure created a pending-input issue for me too.
Now the problem is solved and you may close this issue. Thanks for your quick reply.
No need to feel ashamed! Glad to hear you were able to sort it out quick with our help