This PR allows running marge-bot as a single job rather than looping indefinitely, so it can be managed via CI pipeline schedules instead of deploying it to your infrastructure.
I've added this as a simple flag since I wanted to keep codebase change to a minimum, although I was initially considering another console_scripts entrypoint. But I didn't want to change your approach to deployment too much (see also https://github.com/smarkets/marge-bot/issues/288) so I hope this is fine.
I also considered auto-detecting/defaulting to the GITLAB_CI and CI_SERVER_URL (for gitlab_url) env vars if marge detects it's in a CI environment, to get a bit closer to zero-config. But I also didn't want to break the existing response to required args. It's tempting though, let me know if you'd accept that :)
This PR allows running marge-bot as a single job rather than looping indefinitely, so it can be managed via CI pipeline schedules instead of deploying it to your infrastructure.
See also renovate-bot's approach for something similar. https://docs.renovatebot.com/self-hosting/#gitlab-cicd-pipeline
I've added this as a simple flag since I wanted to keep codebase change to a minimum, although I was initially considering another
console_scripts
entrypoint. But I didn't want to change your approach to deployment too much (see also https://github.com/smarkets/marge-bot/issues/288) so I hope this is fine.I also considered auto-detecting/defaulting to the
GITLAB_CI
andCI_SERVER_URL
(forgitlab_url
) env vars if marge detects it's in a CI environment, to get a bit closer to zero-config. But I also didn't want to break the existing response to required args. It's tempting though, let me know if you'd accept that :)For an example run, see https://gitlab.com/nejch1/test-marge-bot-as-ci-service/-/jobs/1029017409.