Scheduled pause in deployments

We would like to pause deployment periodically.

Our situation is that during the night we do maintenance jobs that make it ill advised to do deploys. So, we would like to automatically block deploys during those periods of time.

Is this possible in Octopus?

Hi,

Thanks for reaching out. You can set your Octopus instance into Maintenance Mode to prevent all deployments from taking place. There’s not a way to schedule this, but you could use the below Octoposh Cmdlet to do it from a script, and then rely on your build server or a scheduled task to get your server into/out of Maintenance mode at specific times of the day.

Let me know if that helps,
Dalmiro

Good idea.

If I want to set up build server to do it, can I execute that command remotely?
Or is there a REST API command for setting the server into Maintenance Mode?

Thanks,
Klas

Hi Klas,

Yes that Cmdlet was made (by me) to be executed remotely, and in the background it uses the REST API. All you need to do is install the Octoposh module on the build agent that’s gonna be executing it.

Cheers,
Dalmiro