I’m just getting started with Jenkins and trying to understand the right concepts to learn first. I want to use Jenkins mainly for CI/CD and automation purposes, but I’m unsure which topics are most important for beginners.
Could someone please guide me on:
What are the core concepts I should understand first?
Are there any must-know features or components in Jenkins I should prioritize?
Should I start with freestyle jobs or go directly to pipelines?
Any recommendations on how to structure my learning would be really helpful.
Directly to pipelines. We started with freestyles when pipeline technology was already well established – solely because it seemed to us that a WYSIWYG-constructor in the UI made more sense than writing code in Groovy that noone of us knew. It was a dire mistake, as freestyle jobs do not really scale (in terms of reusing parts of one job in another), and it all cost us a couple of months later, when something crucial was unavailable through freestyle, and we had to migrate to pipelines anyway
All of my jenkins is self-taught, and I’m not exactly fit to give learning advice – but do invest into learning other folks’ experience. Search for articles describing best practices and cool ideas, watch youtube presentations. If possible – maybe attempt at machine-translating presentations in other languages; sometimes there could be gems too. Read the “pipeline book” in the official documentation
As of core parts – learn about Groovy in general and the types of Groovy in Jenkins; how they differ from each other, how you can’t use some of the Groovy constructs inside the pipeline, how executing pipeline steps is different from executing pure Groovy code (like new File() being a standard way to read files, yet in Jenkins it would always resolve to files on the controller, not agents), etc.
And see if you can apply the Configuration as Code principle to your Jenkins right from the start, be it the JCasC Plugin to handle the entire Jenkins instance or Job DSL plugin / Jenkins Job Builder to describe jobs configuration aside from pipelines they execute.
Yes definitely go for pipeline, they are far more powerful and you can give control to your developers, they will definitely prefer writing code over clicking in a UI.
Installation and setup: How do you want to run Jenkins, on which OS (I would try to avoid using windows for the controller), for Linux, run it as a service or run it inside a docker container, in kubernetes (helm) or aws, update Jenkins and plugins regularly
Configuration: User authentication (e.g. via LDAP, Active Directory, github, SAML, …), user authorization (Matrix auth, role-strategy), consider setting up everything as code with CasC plugin
Security aspects: setup agents that do the actual work (running things on the controller can be dangerous)