what do y'all use for CI/CD?

8 months ago by chrash0 to c/selfhosted

hey nerds! i got a lovely email from GitHub this morning that their increasingly vibe-coded, barely-working Actions features are about to get more expensive (charging by the minute for something that notoriously spin-locks is a special flavor of shit sandwich).

i usually just use whatever i’m given at wherever i’m working. i do have a project that i maintain to parse Ollama Modelfiles tho: https://github.com/covercash2/modelfile and to be honest, Actions is the only solution i’ve ever used that came close to sparking joy, simply because it was easy to use and had tons of community mind-share (i’ve definitely heard horror stories and would never stake my business on it), but this price increase and all the other news around GitHub lately has got me side-eying self-hosting solutions for my git projects. Forgejo seems like the way to go for git hosting, but Actions in particular Just Works™️ for me, so i’m kind of dreading setting something up that will be yet another time sink/rabbit hole (just in time for the holidays! 🙃).

i can install most of my tooling with my language toolchain (read: rustup and cargo) which makes things fairly neat, but i just don’t have a sense for what people use outside of Jenkins and Actions.

i thought this community might have some insight beyond the LLM generated listicles that have blighted modern search results.

thanks in advance 🙏

h54 36 points 8 months ago

IMO, Gitlab CI/CD blows Github out of the water. They're not even in the same league. I recommend Gitlab + self hosted runners (it's so easy).

I've been using Gitlab for many years and host my own runners as of the past 6 months because I nearly exhausted my monthly free tier runner minutes one month.

path: 0 21050385, hotness: undefined, score: 36, children: 5
xcjs 12 points 8 months ago

I second GitLab CI/CD - it's a CI/CD system that just makes sense to me. That doesn't mean it doesn't have its complexities depending on your needs, but I've overall enjoyed my time working with it.

path: 0 21050385 21052106, hotness: undefined, score: 12, children: 0
douglasg14b 1 point 8 months ago

Edit: I forgot this was self-hosted community, disregard.


How does organization work out?

We have dozens of workflows for our monorepo CI/CD stuff. GitHub organization with the flat structure is incredibly annoying.

GitLab is a single file?? (Or am I misinformed? )How does that work out?

path: 0 21050385 21059701, hotness: undefined, score: 1, children: 1
h54 3 points 8 months ago

The repo specific config is a single file. You can also import templates/other files if need be. I worked in a shop where Devops set up a bunch of templates for generic, common jobs which made getting started easy. If custom config/code is required, overriding a templated job was easy. I was responsible for migrating my team's ~50 repos (services, libraries, etc) from Jenkins + Bitbucket into Gitlab and found it to be pretty straightforward.

path: 0 21050385 21059701 21063482, hotness: undefined, score: 3, children: 0
jacksilver 1 point 8 months ago

I had someone swear to me that Github templating was better, but I've only worked with Gitlabs templates. Why do you like Gitlab over Github?

path: 0 21050385 21056396, hotness: undefined, score: 1, children: 1
h54 5 points 8 months ago

Gitlab CI feels native. Github offers similar functionality but it feels/looks like an afterthought. I think the Gitlab .yaml structure is more intuitive. Also, how the Gitlab UI visually represents a pipeline is mcuh better, IMO. Self hosting runners on my server (Ubuntu) is so easy and free. I hadn't tried it with Github but it sounds like it still costs money?!

Note: I don't work for Gitlab

path: 0 21050385 21056396 21057835, hotness: undefined, score: 5, children: 0
Jayjader 30 points 8 months ago

Forgejo has their own runner: https://forgejo.org/...

I've used it on my personal machine, was very easy to setup and mostly compatible with GitHub actions out-of-the-box (including things like actions/checkout@v4).

path: 0 21049812, hotness: undefined, score: 30, children: 10
scrubbles 16 points 8 months ago

Forgejo runners are great! I found some simple actions to do docker in docker and now build all my images with them!

path: 0 21049812 21050397, hotness: undefined, score: 16, children: 4
felbane 1 point 8 months ago

please share, I'm interested in doing the same

path: 0 21049812 21050397 21062265, hotness: undefined, score: 1, children: 3
scrubbles 2 points 8 months ago

Sure! I use Kaniko (Although I see now that it's not maintained anymore). I'll probably pull the image in locally to protect it...

Kaniko does the Docker in Docker, and I found an action that I use, but it looks like that was taken down... Luckily I archived it! Make an action in Forgejo (I have an infrastructure group that I add public repos to for actions. So this one is called action-koniko-build and all it has is this action.yml file in it:

name: Kaniko
description: Build a container image using Kaniko
inputs:
  Dockerfile:
    description: The Dockerfile to pass to Kaniko
    required: true
  image:
    description: Name and tag under which to upload the image
    required: true
  registry:
    description: Domain of the registry. Should be the same as the first path component of the tag.
    required: true
  username:
    description: Username for the container registry
    required: true
  password:
    description: Password for the container registry
    required: true
  context:
    description: Workspace for the build
    required: true
runs:
  using: docker
  image: docker://gcr.io/kaniko-project/executor:debug
  entrypoint: /bin/sh
  args:
    - -c
    - |
      mkdir -p /kaniko/.docker
      echo '{"auths":{"${{ inputs.registry }}":{"auth":"'$(printf "%s:%s" "${{ inputs.username }}" "${{ inputs.password }}" | base64 | tr -d '\n')'"}}}' > /kaniko/.docker/config.json
      echo Config file follows!
      cat /kaniko/.docker/config.json
      /kaniko/executor --insecure --dockerfile ${{ inputs.Dockerfile }} --destination ${{ inputs.image }} --context dir://${{ inputs.context }}     

Then, you can use it directly like:

name: Build and Deploy Docker Image

on:
  push:
    branches:
      - main
  workflow_dispatch:

jobs:
  build:
    runs-on: docker

    steps:
    # Checkout the repository
    - name: Checkout code
      uses: actions/checkout@v3

    - name: Get current date # This is just how I label my containers, do whatever you prefer
      id: date
      run: echo "::set-output name=date::$(date '+%Y%m%d-%H%M')"

    - uses:  path.to.your.forgejo.instance:port/infrastructure/action-koniko-build@main # This is what I said above, it references your infrastructure action, on the main branch
      with:
        Dockerfile: cluster/charts/auth/operator/Dockerfile
        image: path.to.your.forgejo.instance:port/group/repo:${{ steps.date.outputs.date }}
        registry: path.to.your.forgejo.instance:port/v1
        username: ${{ env.GITHUB_ACTOR }}
        password: ${{ secrets.RUNNER_TOKEN }} # I haven't found a good secret option that works well, I should see if they have fixed the built-in token
        context: ${{ env.GITHUB_WORKSPACE }}

I run my runners in Kubernetes in the same cluster as my forgejo instance, so this all hooks up pretty easy. Lmk if you want to see that at all if it's relevant. The big thing is that you'll need to have them be Privileged, and there's some complicated stuff where you need to run both the runner and the "dind" container together.

path: 0 21049812 21050397 21062265 21064618, hotness: undefined, score: 2, children: 2
felbane 1 point 8 months ago

Thanks for the write-up! I've been trying and failing to do DOOD and POOP runners via forgejo, but I haven't had the time or energy to really dig in and figure out the issue. At this point I just want something to work so I'll give your setup a try 😎

path: 0 21049812 21050397 21062265 21064618 21065669, hotness: undefined, score: 1, children: 1
corsicanguppy -6 points 8 months ago

It's still yaml shit though.

path: 0 21049812 21051683, hotness: undefined, score: -6, children: 4
zr0 6 points 8 months ago

Every language, that uses functional white spaces, is absolutely awesome!!

— no one

path: 0 21049812 21051683 21053811, hotness: undefined, score: 6, children: 0
prettybunnys 3 points 8 months ago

What issue do you have with using yaml to define a job?

path: 0 21049812 21051683 21052889, hotness: undefined, score: 3, children: 0
Jayjader 2 points 8 months ago

I dislike yaml as much as the next person, but you can always "just" write Jason JSON (lol autocorrect). Unless I'm misunderstanding your criticism?

path: 0 21049812 21051683 21052879, hotness: undefined, score: 2, children: 1
chilicheeselies 2 points 8 months ago

Yaml is vette than json for this IMO brcausebyou can write comments in yaml, and in general format multiline strings easier. Json is best for system to system comms. Human to system literlaly anything other text formst than json.

path: 0 21049812 21051683 21052879 21057272, hotness: undefined, score: 2, children: 0
thesmokingman 14 points 8 months ago

Please don’t take me as a GH shill because I’m not. I’m not sure we read the same email given your projects. Actions on GH runners are dropping in cost and there’s a new fractional cost for self-hosted. For the average user, especially those on GH runners, costs are going down. Looking at your repo, you haven’t run anything since July. Your workflow files use GH runners. Nothing in your history suggests you’re leaving the free tier so I don’t get this FUD at all. General Microsoft hate? Fuck yeah. Shitty GH service? Fuck yeah. Plenty of reasons to dunk but this was not one of them. M

path: 0 21056623, hotness: undefined, score: 14, children: 0
Carol2852 14 points 8 months ago

I'm using gitea which has CI compatible to GitHub actions with my own runner. It's pretty straightforward to set up and didn't give me any headaches yet. It's a very small instance just for my ownaybe dozen projects though.

path: 0 21049232, hotness: undefined, score: 14, children: 15
yaroto98 6 points 8 months ago

This is what I was using till I switched to forgejo and never got around to setting up one of their runners.

path: 0 21049232 21049289, hotness: undefined, score: 6, children: 10
Carol2852 2 points 8 months ago

I run their act binary on one of my servers. Can't remember much of the setup, so I can't be too bad. I did have to change the used images though, but I guess that comes with maintenance of you own runner anyway.

path: 0 21049232 21049289 21057570, hotness: undefined, score: 2, children: 0
cecilkorik 2 points 8 months ago

If it helps motivate you to give it a shot, I found gitea's runner very confusing to set up, but I felt like forgejo was better designed, pretty easy and well documented.

path: 0 21049232 21049289 21051169, hotness: undefined, score: 2, children: 1
chrash0 1 point 8 months ago

heck yeah this is the review i was looking for 💯

path: 0 21049232 21049289 21051169 21051341, hotness: undefined, score: 1, children: 0
witten 1 point 8 months ago
path: 0 21049232 21049289 21057769, hotness: undefined, score: 1, children: 2
yaroto98 1 point 8 months ago

I hadn't used gitea for long. I just had both running, and then cloned my repos one at a time manually. So long as I had the code, I didn't really care.

path: 0 21049232 21049289 21057769 21063058, hotness: undefined, score: 1, children: 1
witten 1 point 8 months ago
path: 0 21049232 21049289 21057769 21063058 21067100, hotness: undefined, score: 1, children: 0
finn 1 point 8 months ago

@yaroto98 @Carol2852 Same here, switched from gitea to forgejo. I still was using the act runner for some time, later I replaced it with the forgejo-runner.

Works pretty smooth!

path: 0 21049232 21049289 21057656, hotness: undefined, score: 1, children: 3
witten 1 point 8 months ago
path: 0 21049232 21049289 21057656 21057778, hotness: undefined, score: 1, children: 2
finn 1 point 8 months ago

@witten I have switched maybe a year ago or something like that. Didn't loose anything because I was running a compatible version at that time:
https://forgejo.org/...

If you are running a recent version it's probably a bit more complicated.

path: 0 21049232 21049289 21057656 21057778 21057903, hotness: undefined, score: 1, children: 1
corsicanguppy 3 points 8 months ago

CI compatible to GitHub actions

Ugh. More yaml?

path: 0 21049232 21051776, hotness: undefined, score: 3, children: 2
chocrates 3 points 8 months ago

I get the hate but did you ever have to maintain jenkins pipelines? I'll take yaml any day.

I'm game to explore the next evolution though.

path: 0 21049232 21051776 21056991, hotness: undefined, score: 3, children: 1
Carol2852 1 point 8 months ago

That was my first thought as well. 😁

path: 0 21049232 21051776 21056991 21057554, hotness: undefined, score: 1, children: 0
chrash0 2 points 8 months ago

good lead. it’s just the one project for now, and to my surprise it’s actually a dependency for the ollama-rs project, so i feel somewhat obligated to keep it stable.

path: 0 21049232 21049314, hotness: undefined, score: 2, children: 0
Routhinator 12 points 8 months ago

Forgejo and self hosted action workers.

path: 0 21055906, hotness: undefined, score: 12, children: 0
irmadlad 10 points 8 months ago

Watching this thread because CI/CD is something that I'd like to get into.

path: 0 21049018, hotness: undefined, score: 10, children: 3
Zagorath 3 points 8 months ago

Ditto

path: 0 21049018 21050264, hotness: undefined, score: 3, children: 0
elephantium 2 points 8 months ago

Are you a programmer?

path: 0 21049018 21057558, hotness: undefined, score: 2, children: 1
irmadlad 3 points 8 months ago

I..uh....I pretend I am from time to time.

path: 0 21049018 21057558 21063249, hotness: undefined, score: 3, children: 0
avidamoeba 10 points 8 months ago path: 0 21051475, hotness: undefined, score: 10, children: 7
prettybunnys 9 points 8 months ago

Jenkins is good enough to be widely used enough to be hated enough to be downvoted.

The sign of a mature product IMO.

You could do worse than Jenkins

path: 0 21051475 21052937, hotness: undefined, score: 9, children: 5
avidamoeba 5 points 8 months ago

Been using Jenkins since before it was called Jenkins. It's been in use at every corpo I've worked for. It can practically do anything. Especially coupled with Docker.

path: 0 21051475 21052937 21053670, hotness: undefined, score: 5, children: 1
elephantium 4 points 8 months ago

Hudson? Man, that's a blast from the past.

path: 0 21051475 21052937 21053670 21057555, hotness: undefined, score: 4, children: 0
PushButton 3 points 8 months ago

I was scrolling, looking for a Jenkins somewhere, to finally find that post with down votes.

Every company I go, it's a different CICD, and they all make me wish to use Jenkins instead.

path: 0 21051475 21052937 21066275, hotness: undefined, score: 3, children: 1
prettybunnys 1 point 8 months ago

Jenkins is better than many but IMO Gitlab pipelines are top tier.

path: 0 21051475 21052937 21066275 21067237, hotness: undefined, score: 1, children: 0
synae 1 point 8 months ago

"It's the worst one, except for all the others"

path: 0 21051475 21052937 21058344, hotness: undefined, score: 1, children: 0
AA5B 3 points 8 months ago

I’m not entirely sure why all the hate : Jenkins can do the most things the must ways. And yes, it’s so much nicer defining a pipeline with a fully functional language than an assortment of yaml files

Actually that was my response when my company wanted to start using Gitlab ci. It only has one way of doing things so you can probably get a faster start if you had no ci, were a small company, and had simple builds. However we’re over 4,000 builds in many languages from 12 year old monoliths to modern micro services and containers….. and way too much godawful JavaScript. Do you want the quick and simple tool great for a small startup or the all powerful kitchen sink of tools?

path: 0 21051475 21055033, hotness: undefined, score: 3, children: 0
_stranger_ 9 points 8 months ago

Magnetic needle. Steady hand.

path: 0 21052112, hotness: undefined, score: 9, children: 1
TechieDamien 6 points 8 months ago

Not butterflies?

path: 0 21052112 21053052, hotness: undefined, score: 6, children: 0
EarMaster 9 points 8 months ago

Gitlab CI/CD pipelines are my go-to tool. At work we self host an instance, for personal projects I use gitlab.com.

path: 0 21051824, hotness: undefined, score: 9, children: 0
cosmicrose 9 points 8 months ago path: 0 21051529, hotness: undefined, score: 9, children: 0
trougnouf 8 points 8 months ago

Self-hosted Forgejo Actions on a Codeberg repository. It was relatively easy to setup and I don't even need a VPS through my dynamic IP 5G connexion. See also: https://codeberg.org/trougnouf/cfait

path: 0 21060219, hotness: undefined, score: 8, children: 1
victorz 4 points 8 months ago

connexion

I'm imagining you saying "connex-yun", and it reminds me of Stewie saying "cool-hhhwip".

path: 0 21060219 21065751, hotness: undefined, score: 4, children: 0
fruitycoder 6 points 8 months ago

Git lab CI is my goto for git repo based things (unit tests, integration tests, etc). Fleet through Rancher for real deployments (manages and maintains state because kubernetes). Tekton is my in between catchall.

path: 0 21058626, hotness: undefined, score: 6, children: 0
elephantium 5 points 8 months ago

We use Azure Devops at my current gig. It works pretty well for our setup. I've used GHA before; it definitely didn't "spark joy". I wastedspent way too many hours in the "update yaml file, commit, push, wait 5 minutes for it to fail again" spiral of despairfeedback loop.

Nice thing with ADO is its release dashboard -- you get a really nice summary of recent builds and where they went:

$project - dev - test - prod

I didn't see anything similar for GHA.

path: 0 21057662, hotness: undefined, score: 5, children: 2
douglasg14b 1 point 8 months ago

A lot of that pain can be reduced by writing and running your code locally before pushing it to a CI environment. Generally with our automation we write a CLI, And GitHub actions is just an execution environment that calls the CLI.

And if what you're trying to do must execute inside an action. You can run workflows locally with docker!

path: 0 21057662 21059642, hotness: undefined, score: 1, children: 1
elephantium 1 point 8 months ago

That's a great idea if it's possible, but I want to say it wouldn't have helped with our environment at the time.

I almost wish I could look back at that repo and share the yaml file here, maybe I was missing something back then. I'm certainly more proficient with yaml now.

I do recall wishing there was a way to simulate the execution locally. I think I remember hearing about a local runner, but it had too many caveats to help.

path: 0 21057662 21059642 21062740, hotness: undefined, score: 1, children: 0
possiblylinux127 5 points 8 months ago

Woodpecker CI

path: 0 21062841, hotness: undefined, score: 5, children: 0
weastie 4 points 8 months ago

I do devops at work and my experience is that really any CI/CD system works, they all have enough features to do what you want. They all fundamentally just run scripts on boxes. Therefore, I say pick the easiest one, likely the one that is built into whatever Git system you are using.

Try to keep your pipelines simple-ish when you can, they almost never need to be that complicated. 95% of the time it's just running a command or two. If a pipeline needs to do something complex, I'd recommend writing that script into the Git repo and calling it, rather than having a CI job that is 100 lines long.

path: 0 21056499, hotness: undefined, score: 4, children: 1
chrash0 1 point 8 months ago

this is my experience as well. we have a bespoke wrapper around Jenkins, and the more we can test locally the less time we have to spend waiting for the system to fail. it’s one of the reasons i’ve adopted just to script things locally as if it was CI.

path: 0 21056499 21060757, hotness: undefined, score: 1, children: 0
eager_eagle 4 points 8 months ago

fwiw, you can self host a GitHub actions runner

path: 0 21049082, hotness: undefined, score: 4, children: 4
Natanox 4 points 8 months ago

Don't they want to monetize those as well?

path: 0 21049082 21049180, hotness: undefined, score: 4, children: 2
chrash0 8 points 8 months ago

yes, according to this morning’s email

path: 0 21049082 21049180 21049282, hotness: undefined, score: 8, children: 0
eager_eagle 1 point 8 months ago

ah right, my bad

path: 0 21049082 21049180 21049578, hotness: undefined, score: 1, children: 0
scrubbles 2 points 8 months ago

But you are charged for it.

path: 0 21049082 21050398, hotness: undefined, score: 2, children: 0
killabeezio 3 points 8 months ago

So many these days. Actions are probably one of the best, but there are still plenty of others out there.

  • gitlab
  • dagger
  • concourseci
  • tekton
  • Spinnaker
  • harness
  • argo
  • flux
  • gocd

If I were to pick one, it would probably be dagger. Or really anything but Jenkins.

path: 0 21054452, hotness: undefined, score: 3, children: 2
partofthevoice 2 points 8 months ago

Gitea Actions, as well.

path: 0 21054452 21057820, hotness: undefined, score: 2, children: 0
chrash0 1 point 8 months ago

we use Jenkins + a bespoke wrapper at work. thats left a bad taste in my mouth enough to avoid Jenkins altogether

path: 0 21054452 21060768, hotness: undefined, score: 1, children: 0
verstra 3 points 8 months ago

I'm currently looking into Concourse.

It does have steeper-than-average learning curve, but I really like that it has well-defined fundamentals (resources, jobs, tasks) and isolation with OCI containers. Before I adopt it fully, I want it to run my nix flake dev shell.

path: 0 21058764, hotness: undefined, score: 3, children: 0
michael 3 points 8 months ago

Used to use travis or clicleci and they both worked really well. Theres some issues with travis being old/expensive and circle got in touble for a few security issues though. gitlab has some nice tools from my experience.

Im interested as well. Ive got a forgjo that I would love to hook into at some point.

path: 0 21049326, hotness: undefined, score: 3, children: 1
iatenine 1 point 8 months ago
path: 0 21049326 21050784, hotness: undefined, score: 1, children: 0
iatenine 2 points 8 months ago

Are you sure it was a price "increase"?

I got a similar email this morning but it was the exact opposite of what I expected upon closer examination:

https://docs.github.com/...

path: 0 21050796, hotness: undefined, score: 2, children: 1
chrash0 2 points 8 months ago

you’re right. i just expected it to be an increase 😅

path: 0 21050796 21051104, hotness: undefined, score: 2, children: 0
corsicanguppy 2 points 8 months ago

Where's the Bazel people at?

path: 0 21052045, hotness: undefined, score: 2, children: 0
TheHolm 2 points 8 months ago

Woodpecker. No BS CI which can be attached to pretty much anything. It just need a webhook and way to pull your project.

path: 0 21112476, hotness: undefined, score: 2, children: 1
chrash0 1 point 8 months ago

nice. simple and modular i like. i deal with far too many “one stop shops” at work to bring that home

path: 0 21112476 21116690, hotness: undefined, score: 1, children: 0
eager_eagle 2 points 8 months ago

btw, the prices of managed runners are going down, not increasing

https://docs.github.com/...

still good to have a self-hosted alternative though

path: 0 21049586, hotness: undefined, score: 2, children: 1
chrash0 2 points 8 months ago

i honestly didn’t look that close, obviously haha

but yeah, i’ve been kinda looking for a reason to de-Microsoft my stuff

path: 0 21049586 21050637, hotness: undefined, score: 2, children: 0
douglasg14b 2 points 8 months ago

GitHub Actions mostly.

The rest is usually plumbing and code to support it. The actions are just the automated execution environment.

path: 0 21059631, hotness: undefined, score: 2, children: 0
slacktoid 1 point 8 months ago
path: 0 21050379, hotness: undefined, score: 1, children: 0
Mihies 1 point 8 months ago

I use cake build to create the build script and then I can run it from wherever.

path: 0 21049663, hotness: undefined, score: 1, children: 0
HelloRoot 1 point 8 months ago path: 0 21050614, hotness: undefined, score: 1, children: 0
selfhosted
selfhosted

@lemmy.world

login for more options
61554
6650
5623

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

go to feed...