Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow running marge-bot in CI pipelines or as a single CLI job #289

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

nejch
Copy link
Contributor

@nejch nejch commented Feb 14, 2021

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 #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 :)

For an example run, see https://gitlab.com/nejch1/test-marge-bot-as-ci-service/-/jobs/1029017409.

@qqshfox qqshfox merged commit a47d8c1 into smarkets:master Apr 30, 2021
@qqshfox
Copy link
Contributor

qqshfox commented Apr 30, 2021

I agree that we shouldn't break existing deployment. Thank you @nejch !

@nejch nejch deleted the feat/run-as-cli-cmd branch April 30, 2021 11:20
@qqshfox qqshfox added this to the 0.10.0 milestone May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants