Note that this repository provides insights to understand what Jenkins is, but it is not intended to be the main resource for anyone.
-
Master server
- Controls pipelines.
- Schedules builds.
-
Agents
- perform the build.
-
Take a look at this scenario:
-
The two primary categories of Jenkins agents are:
- Static Agent.
- Dedicated machine that is permanently configured to serve as a build agent.
- It is always online and ready to accept build tasks from the Jenkins master.
- Dynamic Agent.
- Machine that is provisioned on-demand to serve as a build agent.
- Jenkins can dynamically spin up instances (virtual machines or containers) as needed and tear them down once the build is complete.
- Static Agent.
-
In Jenkins, builds can generally be categorized into two primary types:
- Freestyle Builds.
- Pipeline Builds.
Freestyle Builds | Pipeline Builds |
---|---|
Overview: ๐ง Traditional and simpler form of builds in Jenkins. ๐ง Configured through the Jenkins web interface using a graphical user interface (GUI). |
Overview: ๐ง Defining the entire build and deployment process as code in a Jenkinsfile. ๐ง This approach enables a more flexible, maintainable, and version-controlled method for defining and executing builds. |
Configuration: ๐ง Users can define build steps, post-build actions, and configurations through the Jenkins UI without the need for scripting. ๐ง It is a point-and-click approach to configuring and running builds. |
Configuration: ๐ง Pipelines are configured using a domain-specific language (DSL) based on Groovy. ๐ง The pipeline script is typically stored alongside the application code in version control (e.g., Git). |
Use Cases: ๐ง often used for projects with uncomplicated build and deployment processes. |
Use Cases: ๐ง often used for projects with complex build requirements, multiple environments, and the need for version-controlled and shareable build configurations. |
-
There are various methods to install Jenkins, as outlined on the official website. However, for this repository, I will be using
Docker
. -
Docker must be installed beforehand;
see here
. -
Take a look at the
official documentation
. -
Check out this
Bash script
for installing Jenkins. -
After installing it, you should see this page when you visit
http://localhost:8080
: