Continuous integration experiences

  • Thread starter Deleted member 43669
  • Start date
D

Deleted member 43669

Guest
I've set up a Gerrit server to replace my aging Gitolite install and I'm looking at something to do CI. I used to have a Jenkins instance, but provisioning it automatically it's a bit of a pain to me.

Have any of you guys looked at any of the new hotness? GoCD, Drone, Concourse, Buildbot...?

I'm looking at something which:

  • integrates with Gerrit (Buildbot seems to have official support, Concourse has a plugin in Google's Github org, GoCD has a random plugin, edit: Drone fooled me, but it doesn't support Gerrit)
  • Build definitions are embedded in the repos
  • Can do complex parallelization
  • Is easy to define paths in the repo which will trigger/not trigger parts of the build (e.g. if I don't touch projectA/**, don't run projectA/BUILD. But if I touch projectB, run projectB/BUILD and projectC/BUILD)
  • Is easy to provision automatically from scratch, has few dependencies

I don't care much for the interface, I'd rather do everything through configuration files, although I'd like to be able to view build output in realtime. Ideally I'd also like something which integrates with FreeIPA.
 
D

Deleted member 43669

Guest
Buildbot is definitely not 'new hotness' compared to Jenkins . . .

Hehe, yeah, it's older, but while it's not as modern as Concourse, it seems to be pretty forward looking (i.e. all configuration is text).

If you're already migrating your repository hosting anyway, have you considered Gitlab, which also has CI facilities built in?

It's on my mind, although I dislike it a bit. First, I don't think I could use it's CI in conjunction with Gerrit. Second, I prefer to avoid that kind of freemium-OSS projects.

...

But probably choosing Gerrit is making things a lot harder. Maybe if I did Gitlab things would be much easier.
 

KallDrexx

Ars Tribunus Militum
2,040
So far I am not a fan of Gitlab's CI, although I have not spent a lot of time trying to tweak it.

We had a .net pipeline set up with 3 4 jobs:

Code:
Nuget Restore -> Debug Build -> Run Unit Tests
              -> Release Build

The person who originally wrote the files had a hard time getting the restore artifacts to move to the next 2 jobs (gitlab cleans the environment at the job level, not the pipeline level) so passing artifacts between jobs wasn't easy. Even once it was figured out we get tons of transient failures where the build process fails because the restore artifacts didn't get passed to the next job correctly. I haven't had the time to look into it to see how to properly fix it.
 
Are you specifically looking for a self-hosted solution? If you're open to a hosted solution then CircleCI is the go-to solution for the teams I know that aren't commited to hosting their own setup. It is docker based and builds from a config file in the repository. I'm not aware of any specific integration for Gerrit but you may be able to accomplish what you need through web hooks or other generic integration methods.
 

Nimdok

Ars Scholae Palatinae
1,214
Regarding Jenkins/buildbot: {
We have a few Jenkins servers that build about fifty different modules for multiple OS distributions. The modules are collected into a single "system" that is then installed.

We recently evaluated buildbot and what killed it for us:
* No support for "artifacts". So if you need to download build #72, from revision #12345, there's no mechanism for doing that unless you build it from scratch yourself.
* No means to support builds as parameters to other builds. We use this feature in our installer module.
* I also don't recall it supporting module dependencies. So if you have a libkoala module that other modules use, you can't trigger their builds after it changes.

Unless you're willing to extend it, I can't see using buildbot for much more than verifying that the last checkin compiled and passed tests.

But given we were evaluating buildbot, you can probably infer we aren't thrilled with Jenkins. Setting up a Jenkins instance from scratch is a significant task that always seems to require a good amount of clicking.
}

When you say "build definitions", are you referring to, essentially, the "CI configuration file"? For example, for program "foo", I may have a CMakeLists.txt build script, but the "build definition" for a Jenkins CI would be an XML file? For our Jenkins system we keep the CI configuration files in their own repository, and manage that with scripts.

What for you is an example of complex parallelization? Every system I've evaluated has sufficient parallelization features.
 
D

Deleted member 43669

Guest
Unless you're willing to extend it, I can't see using buildbot for much more than verifying that the last checkin compiled and passed tests.

Doh, it looked promising, but I had some suspicions which seem to match your experiences

But given we were evaluating buildbot, you can probably infer we aren't thrilled with Jenkins. Setting up a Jenkins instance from scratch is a significant task that always seems to require a good amount of clicking.

Yeah. OK, this is a personal setup so having a CI server as cattle is probably overkill... but this is also a learning exercise for me...

When you say "build definitions", are you referring to, essentially, the "CI configuration file"? For example, for program "foo", I may have a CMakeLists.txt build script, but the "build definition" for a Jenkins CI would be an XML file? For our Jenkins system we keep the CI configuration files in their own repository, and manage that with scripts.

Yeah. Take a look at the new Jenkinsfile support if you are in Jenkins. It will save you from a lot of stuff you are doing, plus pipeline builds are nicer than traditional builds (you get a job per branch, which much clearer than having builds for different branches in the same job).

What for you is an example of complex parallelization? Every system I've evaluated has sufficient parallelization features.

This is mostly theoretical- at work we have test suites which are very slow because they do lots of VM provisioning, so having something which can orchestrate provisioning operations and testing (e.g. test A, B and C depend on provisioning P1, etc.) would be nice. However, I think that doing optimal parallelization is going to be excessively complex (our tests are lightweight and our SUTs are Amazon VMs, so testing could be *very* parallel).

Are you specifically looking for a self-hosted solution? If you're open to a hosted solution then CircleCI is the go-to solution for the teams I know that aren't commited to hosting their own setup. It is docker based and builds from a config file in the repository. I'm not aware of any specific integration for Gerrit but you may be able to accomplish what you need through web hooks or other generic integration methods.

I don't feel comfortable with public CI services (such as Travis for open source), because I'm going to use secrets in my builds. And paid, private CI (such as Travis private option) looks very expensive. I pay 36€/month for a dedicated server which has the muscle I need, so I'd rather use that.
 
+1 for Gitlab

I don't use it in all my projects, but their CI system is built in and the UI makes it fairly friendly for the developers. I'm more of an Ops guy, so I like the simple shell commands I can put in them.


On another approach, for my personal website, I use Github webhook -> AWS API Gateway -> AWS Lambda. The API Gateway thing was a pain in the rear end, but it honestly was an easy setup (I was trying too hard because I wanted to understand it). I set Github to push all MR's to the lambda, and the lambda runs basic code to decide if it should do anything (e.g. an accepted merge to master). This works great for single-purpose or common-purpose scripts, but not great for dynamic CICD setups that can't be easily accounted for in a simple script.


You really didn't say what the scope and/or cost goals you had... At work, I set up CICD using Gitlab multi-runner. Every single build step gets its own AWS Spot instance (which is typically 50% off on-demand prices). It does require a listener running 24/7, and that listener spins up the AWS Spot instances on demand. Of course, this has costs. While this sounds expensive, we can run up to 16 concurrent CICD builds during the day now for the price of our old ~3 concurrent jobs using dedicated (24/7 on-demand pricing) servers. Only paying when the system actually is in use, aside from the t3.nano manager node($4.50/mo on-demand), is huge. If you're still eligible for free tier, that manager node could also be free. Here's a link to my personal blog with this setup, if you're interested.

I liked Jenkins in the past, but honestly I felt it was generally more heavyweight then I needed.
 

Vince-RA

Ars Praefectus
5,524
Subscriptor++
The person who originally wrote the files had a hard time getting the restore artifacts to move to the next 2 jobs (gitlab cleans the environment at the job level, not the pipeline level) so passing artifacts between jobs wasn't easy. Even once it was figured out we get tons of transient failures where the build process fails because the restore artifacts didn't get passed to the next job correctly. I haven't had the time to look into it to see how to properly fix it.

Look at artifacts for passing artifacts between stages and dependencies for passing artifacts between jobs. Make sure you have a reasonable artifact expiration policy for non-release builds :)

GitLab CI is pretty darn good imo. My one real complaint has been with the lack of a templating system for sharing common steps between projects - this can be painful and lead to a lot of copypasta, especially if you don't get it right the first time.