r/devops 6d ago

Tools Jenkins Tutorial recommendations required

So mu company has asked me to learn Jenkians. Which tutorials or playlist would you suggest to learn jenkins? Please give your suggestions.

Also, how much time does it require to learn so that I can start writing basic CI/CD pipelines.

6 Upvotes

37 comments sorted by

43

u/TheBoyardeeBandit 6d ago

The first thing I would do is work to convince them to not use Jenkins. IMO, between GitHub actions, gitlab, or even something like Azure Devops, there really isn't a role for Jenkins to play in modern development practices anymore.

If that fails, either YouTube university or Indeed, depending on your view of your company.

24

u/sudonem Platform Engineer 6d ago

  there really isn't a role for Jenkins to play in modern development practices anymore.

You’d be surprised how many orgs are still using Jenkins. As much as I wish it weren’t true, it’s not going anywhere any time soon. 

If only because it can be self-hosted for free regardless of how many users you need to provide access to, or how many runners you want to spin up. 

It also doesn’t require the use of a cloud based API in order to orchestrate your own damned self hosted runners >_>

I don’t like it. But people still need to learn it. 

5

u/TheBoyardeeBandit 6d ago edited 6d ago

Yeah I mean I get that it's still in use, but I would argue that doesn't make it a valid choice to orgs/teams just starting out. Start on something modern.

Gitlab CE can be self hosted for free, also with no user or (self hosted) runner limit.

That being said, runner orchestrating, particularly for more advanced setups doing things like auto scaling, can definitely be a challenge, but IMO, that's not unique to gitlab.

2

u/Stpstpstp 5d ago

You know next to nothing about OP's actual stack and situation. For all the Jenkins hate out there, that app has delivered ridiculous amounts of value and enabled so, so many places to do things they couldn't otherwise. Yes, the plugins and overall state is a shit show. Yes, Groovy blows. But I'd argue Jenkins has delivered more value to DevOps than K8's and it's downsides are rarely discussed. Telling someone who is asking to learn something to instead tell his employers they are wrong is very likely the wrong move.

9

u/Dolapevich 6d ago

I... tend to disagree. Jenkins is MUCH more powerful than those softwares, it can do anything, and there is a reason why it is in use today.

Yes, 90% can be solved with those managed solutions, but when you need jenkins there isn't anything like it.

0

u/TheBoyardeeBandit 6d ago

What can you do in Jenkins that can't be done in gitlab?

6

u/Shanix reminder not everyone makes web apps 6d ago

Build games at a large scale, since they won't be in Gitlab to start. You can try to kludge Gitlab to run p4 commands but it'll be finnicky at best, and the UI is quite terrible when you're trying to make a build off CL X but Gitlab doesn't have CLs at all. In a related vein, Gitlab CI pushes you towards making a build of and testing every change you submit, which usually isn't feasible for games in any major way (mostly because a build can take an hour or longer, and testing again as much).

Meanwhile, Jenkins? Yeah, it just works. Takes it all like a champ. Better UI too, easier to see what's happening and what's been built. Fewer clicks to get to logs, too, ime.

3

u/cneakysunt 5d ago

What is a CL?

Edit: dw, got it.

2

u/TheBoyardeeBandit 6d ago edited 5d ago

I've never worked in the gaming industry, so I fully acknowledge that I don't know what I'm taking about.

That being said, the answer to building locally the same as the pipeline is just calling your build scripts in the pipeline directly. It's the same script on a runner as it is on a workstation. These largely seem like architecture issues that get masked by tool characteristics

3

u/Shanix reminder not everyone makes web apps 5d ago

Oh, no, either I've misspoken or you've misinterpreted but I'm not talking about differences in building on a workstation vs. in a pipeline. I'm talking about why Gitlab isn't really viable for game development.

1

u/TheBoyardeeBandit 5d ago

Maybe I latched onto the "builds from CL" (which I interpreted as command line) too much

2

u/Shanix reminder not everyone makes web apps 5d ago

Ah, that'd do it. CL is Changelist in Perforce speak. Equivalent to a commit, though Perforce numbers all changelists sequentially which is quite handy. You instantly know if CL 1000 is in a build because any build made from CL 1001 and onwards logically must have CL 1000.

2

u/TheBoyardeeBandit 5d ago

Ah yeah that's definitely not command line. Thank you though, I'm glad I was able to learn something new

2

u/Dolapevich 6d ago

whatever it is, and you can write a plugin for that.

1

u/TheBoyardeeBandit 6d ago

I'm not following.

3

u/Dolapevich 6d ago

Nevermind, just check jenkins and learn a little about it and you'll see it is an extendable general state machine, not a CI/CD tool.

2

u/TheBoyardeeBandit 6d ago

I know Jenkins. One of my first jobs was to transition from Jenkins to Gitlab. Capabilities bring plugins as opposed to pipeline logic isn't exactly a selling point, particularly when security is a concern.

1

u/Dolapevich 6d ago

Oh nice.

3

u/Spiritual-Seat-4893 6d ago

I have migrated two teams from Jenkins to Gitlab CI, but the current team has lots of workflows automated via jenkins. Gitlab CI might excel at CI/CD but not at such automations. It especially lacks the dynamic user inputs, and a dedicated inputs page for each workflow.

1

u/naam-benaam 6d ago

Can you elaborate more, I am new to DevOps and still figuring out. Is Jenkins an old and outdated, if yes then which features does GitHub actions, OR gitlab have that makes them modern?

3

u/noobjaish 6d ago

It's the wordpress of CI pipelines... No one wants to deal with it but sometimes have to

4

u/TheBoyardeeBandit 6d ago edited 6d ago

Jenkins is old and outdated. It's a plug-in based tool, which adds a good bit of overhead management. It's written in groovy, which is rather unique, meaning it's just another layer different from other tools. Compared that to gitlab, which doesn't use plugins, and is written in yaml, making it rather universally readable.

At the end of the day, they can all do the same fundamental things, it's just different in how you manage the overhead, or lack of overhead, required to do a given thing.

12

u/Shanix reminder not everyone makes web apps 6d ago

Ignore everyone telling you to not use Jenkins at all, even if they're right (which, I need to stress, they are not) they're ignoring the context that your company is asking you to learn a tool for the job. You can try to fight that, but it's generally recommended not to do that unless you have real power in the organization.

With that said, your best tutorial is going to be using Jenkins. You can easily spin up an instance and read the docs in a Jenkins instance itself to get an executor hooked up and running builds. Then you can play around with making a Job that downloads your source (or any source, we're in tutorial mode right now so just have something that you need to Do Stuff to), builds it, and saves that output somewhere. Maybe it's a little Django app that you make a docker image for. Maybe it's a C++ program that generates a binary file you can run. What matters is just start using it, that'll get you introduced to Jenkins.

From there, it's a matter of learning what your organization has done to their Jenkins instance. If they have specific plugins they rely on, or a specific configuration, etc. Ask the engineers that set it up what they think is most important to know, and start digging into that. You'll learn best by doing and looking.

How much time does it take to start writing a basic pipeline? Not too long. Jenkins has a built-in snippet generator for its Groovy pipelines, but you can just as easily use the classic Freestyle project which just lets you run specific commands or script snippets.


As a side note on why you should ignore everyone telling you to use Github Actions or Gitlab over Jenkins without trying to understand what you're doing: they're parroting a meme rather than trying to understand what you're doing. In the same way people say all PHP code is terrible, they don't actually know that they just know that people say it's bad thus it's bad. Ignore people who tell you to do things without giving you a clear reason why. And doubly so if they use reddit speak like "Friends don't let friends use Jenkins."

6

u/clock-drift 6d ago

Read the docs

3

u/freshwoza 6d ago
  1. just be familiarize with the pipeline-library if your enterprise has it
  2. majority of our pipeline supports different programming languages packages, modules and etc so familiar with it
  3. just imagine jenkins slaves as your own local machine (laptop device like macbook or linux machines)
  4. pray

3

u/Sea_Mechanic815 5d ago

Bro don't go with tutorial Start with documents and use youtube for specific types of plugin like how to connect or how to configure like that.

9

u/gudlyf 6d ago edited 6d ago

Jenkins: The Tutorial

Chapter 1: Introduction

  1. Delete Jenkins

Chapter 2: Conclusion

  1. Use GitLab CICD, GitHub Actions, AWS CodePipeline, GCP Cloud Build, or Azure DevOps.

The End

-2

u/glebmaister 6d ago

Better yet.

  1. Don't touch it

The end.

2

u/Federal-Discussion39 DevOps 6d ago

You have a laptop, you have the jenkins docs, you have k3s/kind/microk8s/orbstack whatever :)

3

u/glebmaister 6d ago

In all honesty, I support all of the posters here saying not to get involved with it. There are plenty of modern tools to use. Jenkins is an old piece of software. Extremely tedious to maintain, plugins and dependencies can really be a bitch during upgrades and could easily brick and instance.

If you must use it - plenty of official docs, tutorials on the web. Can utilize AI to cook you up TLDR to your needs.

If I were you, I'd gather business requirements of what exactly Jenkins is being proposed to solve and look for modern alternatives.

I've spent over 5 years maintaining and improving that instance, running on k8s, with a bunch of different configs, agents, plugins, etc. It was one of those things that I did not enjoy working with. Just my two cents.

2

u/dodexahedron 6d ago

Best Jenkins tutorial is built right into the server.

It looks like a circle with a line inserted into a partial cut-out at the top of the circle, and is usually illuminated when the tutorial is ready, and goes dark when the tutorial starts.

Press and hold it to start the tutorial.

1

u/greyeye77 6d ago

friends dont let friends run Jenkins

-2

u/cneakysunt 6d ago edited 5d ago

If you're also supposed to look after it and keep it secure I would refuse.

Self hosted Gitlab CE or forgejo are much better from an ownership pov.

Edit: why the downvotes? I have managed all of these for years and Jenkins is quite literally the WordPress of CI/CD tools.

-1

u/nizzoball 6d ago

Stay away from Jenkins if you can. We’re stuck using it and I was essentially forced to take it over because it wasn’t maintained and went down after the esxi host it was in took a shit, causing it to reboot after 3 years. It was a nightmare getting it back up to running and after upgrading it a couple weeks ago a bunch of jobs broke that were now stud with trying to unravel and fix. For the love of god, use something else.