Set cron when merge train is toggled
🔎 What does this MR do and why?
We had an incident where a merge-train pipeline schedule cron was changed and we are not sure when or why. To keep the merge train pipeline schedule consistent and known, in this MR, we add the cron string to the MergeTrainService
so that any time the merge train is enabled or disabled, the correct cron is updated as well.
This means if the cron is ever changed manually, it will reset the next time this service toggles the cron. If we want to permanently change the cron, the CRON constant added in this MR would need to be changed. So the benefit here is we know the cron will restore itself and the cron string is checked in with source code.
Related to gitlab-com/gl-infra/delivery#19431 (closed)
Author Check-list
- [-] Has documentation been updated?
Edited by Steve Abrams