samson icon indicating copy to clipboard operation
samson copied to clipboard

Ability to schedule deployments / jobs / tasks

Open agilgur5 opened this issue 8 years ago • 5 comments

Was looking for a way to schedule a deployment of a stage, i.e. a way to say "deploy master to stage-x at 3 am each day".

Saw here https://github.com/zendesk/samson/pull/1522#issuecomment-265631900 that background jobs may be "too tedious" to support, but it seemed like this could be as easy as running a cron job at a specified interval to call the code to make a deployment of a revision on a stage. Monitoring it would just be through the regular monitoring for that stage then.

Correct me if I'm missing something because that was my understanding after reading docs and a bunch of PRs and issues.

agilgur5 avatar Oct 25 '17 01:10 agilgur5

Periodic deploys might be helpful see https://github.com/zendesk/samson/pull/2175

this will deploy selected stages once a day (you can chose the interval but not the start time)

/fyi @yizhang-zen

grosser avatar Oct 25 '17 09:10 grosser

As far as I can tell, the interval is also only chosen once globally . Customizing it per deploy would be much more useful. Right now I'm just running a CronJob to hit the deploy webhook as a workaround

agilgur5 avatar Nov 03 '17 00:11 agilgur5

using cron sounds like a decent solution ... keeping track of timers etc inside of samson sounds like a lot of work that won't be used by many users and I'd prefer to avoid :)

grosser avatar Nov 03 '17 02:11 grosser

I would think that the same timers that are used for Locks can be used here, no? Alternatively, if cron is already being used inside of Samson, this could just create / delete cron files

agilgur5 avatar Nov 05 '17 22:11 agilgur5

Yeah ... Could create deploys with scheduled at field ... Then make sure to never start them ... And have a timer check/start them every minute or so

On Nov 5, 2017 14:56, "Anton Gilgur" [email protected] wrote:

I would think that the same timers that are used for Locks can be used here, no?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/zendesk/samson/issues/2313#issuecomment-342012922, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAsZ0VzG62al-L_LBOJXUDahOUG_ebvks5szjz6gaJpZM4QFT6b .

grosser avatar Nov 05 '17 22:11 grosser