News for hackers. Stuff that matters.
Re:The worst thing about Jenkins is that it works by j1elo on Sunday December 03, 2023 @05:00PM (#38511171)
I'm in the apparently small group of people who ignores 90% of the made & shared features, and push back against making internal ops to depend too much to any particular CI system.

We know how to build, package, and release our software, and at work I firmly support that we write those operations as standalone scripts that in principle could even run in the developer's machine itself. Moving them to CI is just changing the machine that will run the scripts, and that's where I draw the line of how much coupling to accept with any given runner: run scripts, inject secrets, and maybe accumulate artifacts between jobs.

There are a myriad of things done with Actions, such as preparing NPM, or running Docker containers. I see no point in them, you should be able to manually run the same commands, one by one, locally on a VM or empty Docker container, so at that point why not write them as a script. Use CI as a dumb shell runner. Getting to depend on all those small Actions saves 5 minutes today, only to make migrations immensely painful tomorrow.

Re:The worst thing about Jenkins is that it works by hardwaresofton on Sunday December 03, 2023 @06:48PM (#38512016)
I definitely agree with and do this — it only falls apart when CI environment stuff interferes with file locations and other external state.

That said it is nice (if the scripts are simple) to do things like machine set up very easily.

Re:The worst thing about Jenkins is that it works by wombatpm on Sunday December 03, 2023 @05:30PM (#38511414)
Especially if you have to run and deploy on your own servers. Not everything can be in the cloud.
Re:The worst thing about Jenkins is that it works by gonzo41 on Sunday December 03, 2023 @06:45PM (#38511998)
I agree with this, I recently had a pretty long network issue with our CI system and for the most part we just reran scripts or converted ci yml into scripts.

I like CI for secrets management, scrpted pipelines and deploying. And having one button do do all of that. But all the extra junk people do with it seems like another thing to have break.

Re:The worst thing about Jenkins is that it works by physicsguy on Monday December 04, 2023 @04:19AM (#38515249)
Same. I've also had to do things like migrate CI when a company was acquired, from Travis to Circle and Circle to GitLab in the past. It's very painful to do this if you've leaned into everything the CI service offers.
Re:The worst thing about Jenkins is that it works by DrScientist on Monday December 04, 2023 @06:13AM (#38515924)
Indeed - a whole generation seem to be doomed to learn the hard way the painful lessons of lock-in.
Re:The worst thing about Jenkins is that it works by seadan83 on Monday December 04, 2023 @01:30PM (#38521035)
Agree, I like to have a top level "verify" script that does all checks and have CI run exclusively and minimally that one script. Ideally the verify script is just a wrapper around a build and test command
Re:The worst thing about Jenkins is that it works by growse on Monday December 04, 2023 @05:36PM (#38524133)
This is fine if you treat your CI provider as a "dumb shell runner". But good CI platforms have actually useful features and APIs (e.g. caching) and if you want to use them, a simple Makefile isn't going to work. For projects where the difference between a cold and warm cache build is tens of minutes, those features have meaningful quality of life improvements.

This may be a tradeoff you're ok with, but for a lot of people, it's not.

Re:The worst thing about Jenkins is that it works by j1elo on Monday December 04, 2023 @07:48PM (#38525575)
C++ with templating can take a while to compile, so for caching my build system would include mounting a Docker volume with contents of ~/.ccache/. This was well integrated with the rest of the scripts, so it would work equally fine if I ran them in my laptop or in the CI runner.

My point is that I really don't believe that CI systems provide anything so unique that it couldn't be also provided by local software in a developer's laptop. If the question of "how do I build this in my laptop" is "you cannot, must use CI because we truly require some of its features", I'd consider that an ops failure.

However, I fully admit my experience comes from small to middle size projects. I cannot talk about big or huge scale projects. Maybe that's where needs grow so complex that CI features become truly necessary.

Re:The worst thing about Jenkins is that it works by growse on Tuesday December 05, 2023 @07:03AM (#38529812)
> My point is that I really don't believe that CI systems provide anything so unique that it couldn't be also provided by local software in a developer's laptop. If the question of "how do I build this in my laptop" is "you cannot, must use CI because we truly require some of its features", I'd consider that an ops failure.

So I do agree with this. But I think there's nuance here.

The job of producing a build artifact involves steps that broadly break down into two categories: setting up the context, and doing the build. I totally agree that the "doing the build" bit should be a series of simple steps that are agnostic of their environment. A shell script, or a Makefile - something you can just invoke anywhere.

But the context bit is also super-important. On my laptop, I've already got the (e.g.) right JDK installed so that when I run `make`, the build succeeds. But I'm also not wiping my laptop before every build. On a CI platform, you're effectively starting from scratch every time, so whilst you can go and write your own code to set up the caching, download the tooling etc. etc. there's an enormous amount of value to be gained by re-using the CI-platform's software and features to do that as easily as possible. No-one wants to be writing code that works out how to go set up the right JDK in the right place, when `actions/setup-java` will basically do all that for you.

In theory, yes, you could go and curate a container image that has everything you need and just run your build inside that, but now you've got two bits of software to manage.

If you can't run the build locally, then yes, you're in a pickle.

Re:The worst thing about Jenkins is that it works by baby_souffle on Tuesday December 05, 2023 @10:05AM (#38531751)
This is something I’ve struggled to communicate internally.

The closest I came was a GitHub actions job that did preflight checks to make sure all the right dependencies and sdks were present before calling into the same build script we use locally.

Don’t care where or how you set up your build environment, if the pfc passes your build should too. We still have some holdouts that do environment setup with a make file :/

Re:The worst thing about Jenkins is that it works by j1elo on Tuesday December 05, 2023 @04:11PM (#38536948)
Thanks for expanding on your point of view. Now that I read you, I'd say that we fundamentally agree.

My experience has been to use carefully constructed Docker images that have the required dependencies to build the project. This removed the need for installing everything in the correct version on each dev system, and ensured a commonly shared base system on which to build stuff.

However I agree that a "context" can have lots of moving parts, and I was disregarding most of them as "exercise for the reader" aka. devs ought to know what they're doing if they wanted to build locally. CI can help a lot with that.

Re:The worst thing about Jenkins is that it works by duped on Monday December 04, 2023 @09:42PM (#38526418)
Caching is the biggest reason why you shouldn't rely on CI platform "features" because they're quite bad at it. Roll your own and be happier with lower prices and no lock in.