Any suggestions for a self-hosted CI that can also be run locally?
I left Github a while ago and have been relying on simple pre-push scripts in my workflow, but would like to be able to test PRs from others without putting my machine at risk. Besides codeberg and radicle (neither of which have reliable CI), I also have a build machine, where I could run CI jobs, however it is important that the CI jobs can also run locally so that external people do not require access to the build machine.
Is there a CI that can do those things (run locally and remotely)?
You may try out https://github.com/melezhik/sparky which is a local / remote task runner with nice front end and scripts could be written on many languages
@onlinepersona don't do it. Create makefiles or whatever that runs the build as a series of Podman/Docker commands or whatever, then just put as little CI config as possible around it. You'll thank me when you need to switch CI system.
I can't upvote this comment enough. I grow so angry at Gitlab ci and GitHub actions. Even Jenkins got in on the junk.
Just use normal build tools and you can use whatever cruft you want around it with just a few lines instead of monster ci file that goes out of date next year.
Great timing. I'm interested in this as well. I am currently attempting an ansible setup that runs podman containers in a couple lxc incus containers (developnent setup to mimic production) with forgejo and woodpecker on the other lxc container but it has been a battle.
Currently unable to figure out why the 'general.community' modules won't get recognized by ansible.
Why ansible? I'm not sure how that fits in. Does that make running it locally easier? An example of working setup that I can checkout and run would be useful.
As I mentioned it is to reduce dependency on CI tool. You may have to shift the tool in the future and if you use a lot of commands specific to the CI tool, that is going to be a nightmare.
Ansible is agent less and only needs SSH access. You can SSH into your local system, from the same local system. Need to add few entries in your SSH config and known_hosts. Essentially everything in Ansible are shell commands. So you are not really that much locked into Ansible.
On the question,
Does that make running it locally easier?
If you mean making it easier compared to remote, on the surface level, the answer is 'no'. But it makes CI pipeline easier to run independent of your environment. Ansible is here to reduce dependency on a specific tool.
Bonus point is you can also create a working but basic CD system with Ansible.
gitea has had some organizational problems so a lot of people have been using forgejo instead, which is just a community fork of gitea plus some more features
After perusing the docs, this looks more like it. Thank you. I'll just have to explore how it can be combined with projects that use nix and those that don't. My biggest issue with CIs has always been caching, but as the saying goes "there are 2 hard problems in computer science..."
It also has a CLI tool that I know can re-run your pipeline locally for debugging, so just running it normally should also be possible. Haven't used either so far though.
What if they pull in a new dependency with a CVE or that executes malicious code? How am I supposed to check that? Or what if I miss a bug in the justfile or shell script?
Run your CI in a sandbox.
For example gitlab allows you to run in a docker image.
Unless the attacker knows a docker CVE or is willing to waste a specter style 0-day on you, the most they can do is waste your cpu cycles.
@szicari@programming.dev it should be noted that they're shutting down the open source project. However, a fork is apparently forming. But it's good to know.