I have designed a project which has 7 steps. All the steps have run condition that the previous steps should be successful. I have 2 questions regarding this,
When will Octopus decide a particular step as failed? Whenever there was an issue, the process was running without letting me know that there is a problem. I had to cancel it and then see the log for reason. The log had the reason of the issue. Is there a way to set up a time limit for which octopus has to try and if it cannot complete within that time, declare it as failed process?
Also, one of the step is sending mail in which I am trying to send mail stating the status of each of the processes. My expectation is that if 2nd process fails, this mail step(5th step) should run and let me know that my 2nd process is failed. Is it possible to configure as I stated? If yes, please direct me in correct direction.
I have attached video explaining the same for better understanding.\
Also, Is there a way to configure 2 mails. One for successful completion and other one incase of failure?
Thanks for getting in touch! Octopus is designed to return an error when the script/application its deploying returns an error. The deployment is handled by Powershell, if an exit code is not returned to the console session then Octopus does not know to stop. We do have a section on error handling in Octopus which may be of some use to you here. https://octopus.com/docs/deploying-applications/custom-scripts#Customscripts-Errorhandling
As for your second question. It looks like you are on the right track with the email step set to run on failure of a previous stel. To provide you with more useful information when the email is sent, you can use system variables to output information from your deployment. https://octopus.com/docs/deploying-applications/variables/system-variables
The following link in our documentation has some examples of what you can output in your email.
Using the run conditions you can set a second email step to run on success before the run on failure email step. A more involved option would be to use a run condition variable. Here is a link with some basic examples.
Note that our run condition variable feature is only able to handle our variable substitution syntax, it can not handle any other kind of scripting.
I hope the above information gets you going in the right direction. If you have any further questions here or get stuck, please feel free to get back in touch.