What is Jenkins?
Jenkins is an open-source automation platform that allows you to Build, Test and Deploy software using pipelines.
- It helps software teams facilitate Continuous Integration and Continuous Deployment / Delivery.
 - Jenkins is highly extensible
- There are hundreds of plugins
 
 
Why do we need Jenkins?
- Developers making code changes in parallel want to make sure that their changes integrate without errors.
 - Developers also want their changes built and tested in a standardised environment.
 
Jenkins Installation Methods
- Run from a WAR (Web Application Resource) file
 - Run as a Docker container
 - Install on Windows
 - Install on MacOS
 - Install on Linux
 
Jenkins Infrastructure
- Master server
- Controls Pipelines
 - Schedules Builds
 
 - Agents
- Perform the build
 
 
Agent Types
- Permanent agent
- Dedicated Servers for Running Jobs
 - Java and SSH installed (passwordless authentication)
 - Also install any build tools needed
 
 
- Cloud Agents
- Ephemeral / Dynamic Agent spun up on demand
 - Example: Docker, Kubernetes, AWS
 
 
Build Types
- Freestyle Build
- Simple and easy to run
 - Similar to shell scripting
 
 - Pipeline
- Use Groovy syntax
 - Run in stages
 
 
Jenkins folder location
/var/lib/jenkins
GitHub and Jenkins Integration Benefits
- Ability to clone a codebase down to the local jenkins workspace
 - GitHub pushes new changes
 - Jenkins can perform GitHub operations
- Build result published to GitHub Pull
 - Requests and Commits
 
 
Integration Prerequisite
- GitHub must be able to send data to Jenkins
 - Jenkins must have a public IP
 - Except for on-premise GitHub instance