Jenkins usage
What is Jenkins?
Jenkins is a continuous open-source integration written in Java. It was forked from Hudson Project after a dispute with Oracle. Since the fork, Jenkins has grown to be much more than a continuous integration solution.
Jenkins is not just a Continuous Integration tool anymore. Instead, it is a Continuous Integration and Continuous delivery tool. You can orchestrate application deployments using Jenkins with a wide range of freely available community plugins and native Jenkins workflows.
Jenkins also supports GitOps workflows with Jenkins X. It helps you accelerate the continuous delivery pipeline on Kubernetes.
Jenkins Use Cases and Core Features
The following are the main Jenkins use cases from my experience extensively working on Jenkins.
- Continuous Integration: With Jenkins pipelines, we can achieve CI for both applications and infrastructure as code.
- Continuous Delivery: You can set up well-defined and automated application delivery workflows with Jenkins pipelines.
- Automation & Ad-Hoc Tasks: With Jenkins jobs and pipelines, you can automate infrastructure components and perform ad-hoc infrastructure tasks (Backups, remote executions, etc.).
Let’s have look at the overview of key Jenkins 2.X features that you should know.
- Pipeline as Code
- Shared Libraries
- Better UI and UX
- Improvements in security and plugins
My Jenkins Usage
At first, I was getting an issue:
535-5.7.1 Username and Password not
accepted.
It happend
because the settings of the smtp server were not applied correctly due to the new Google
Security Policies.
Since 30 May 2023, Google doesn't support Less Secure Apps feature by default.
We have to follow steps below to resolve the Authentication issue during sending email via SMTP.
- Enable 2-step Verification in your mail
- Generate App Password for Jenkins. This setting can be found in the Security -> 2-Step Verification -> App passwords at the bottom of the page
- Use generated password in your Jenkins mail settings
Once we've finished, we can proceed to build our simple pipeline. It includes:
- Created test scripts
- Set Git integration for every build
- Add bash command to execute test scripts
- Set auto-email sending about successed/failed build
Once we done with the steps above the build can be executed.
And we also got the email notification about the completion with the link to the build.