=========================== What is Build & Deployment =========================== => Take latest code from Git Hub Repo. => Build Source code using Maven. => Perform Code Review Using Sonar. => Upload Project Artifact into Nexus. => Create Docker Image for the application => Push Docker image to docker hub registry. => Deploy app in k8s cluster. => In single day multipe times code will be committed to git hub repository from Development team so multiple times we have to perform project build and deployment process. Note: If we do build and deployment process manually then it is time taking process and error prone. => To overcome above problems, we need to automate Project Build and Deployment process. => To automate project build and deployment process we will use JENKINS. ======== JENKINS ======== => Open source Software & free of cost => Developed by using Java Language. To run jenkins server we need to install java s/w first. => It is called as CI CD Server CI : Continuous Integration CD : Continuos Delivery => CI CD is one appraoch to automate project Build & Deployment process. => Using Jenkins we can deploy any type of project (ex: java, python, dot net, react, angular). =============== Jenkins Setup =============== @@ Git Repo : https://github.com/ashokitschool/DevOps-Documents/blob/main/01-Jenkins-Server-Setup.md =============================== what is job in jenkins ? =============================== => JOB means set of stages that we are giving to jenkins to perform the task => In Jenkins JOB we will configure stages like below stage-1 : Clone my git repo stage-2 : Perform maven build stage-3 : Create Docker Image stage-4 : Push Docker Image to Docker Hub stage-5 : Deploy Docker Image in k8s cluster stage-6 : Send Email Notification to team with status => Jenkins JOBS we can create in 2 ways 1) Free Style Project (GUI) 2) Pipeline (code) => Pipeline creation we can do in 2 ways 1) Declarative Pipeline 2) Scripted Pipeline (Groovy Scripting) ================================ Declarative Pipeline syntax ================================ pipeline { agent any stages { stage('git clone') { steps { // logic } } stage('mvn build') { steps { // logic } } stage('docker image') { steps { // logic } } stage('k8s deploy') { steps { // logic } } } } ================================ Jenkins with Docker Integration ================================ Project setup Steps Provided in Git Repo :: https://github.com/ashokitschool/DevOps-Documents/blob/main/04-Jenkins-Docker-Project.md ============================================= Jenkins with Docker + Kubernets Integration ============================================= Project Setup Video : https://www.youtube.com/watch?v=llBvl_iSLDw Project Setup Document : https://github.com/ashokitschool/DevOps-Documents/blob/main/10-Jenkins-Docker-K8S.md