1. Create a job chain of Job 1, Job 2, Job 3 and Job 4 using build pipeline plugin in Jenkins
2. Job 1: Pull the Github repo automatically when some developers push the repo to Github.
3. Job 2 :
4. Job 3: Test your app if it is working or not.
5. Job 4: if the app is not working, then send email to the developer with error messages and redeploy the application after code is being edited by the developer
**Note: **Preferably, Perform the tasks on Linux Machine for smooth functioning and seamless installations ( I am using RHEL-8).
STEP 0: Load your Jenkins server and restart the services
$ systemctl restart jenkins
STEP 1: Create a job chain of Job 1, Job 2, Job 3 and Job 4 using build pipeline plugin in Jenkins
Install Build plugin in Jenkins by going to Manage Jenkins → Manage plugins → Available → Search for build plugin, install and restart
STEP 2: Create Job 1 which will pull the Github repo automatically when some developers push the repo to Github.
2. In Build Trigger, select GitHub hook trigger which makes the job pull the code only when there are some changes made in GitHub repo
3. In Build, select Execute shell to perform following commands which will create a directory in the container and copy all the files from the GitHub repo to this directory
STEP 3: Create a Job 2 which by looking at the code or program file automatically start the respective language interpreter installed image container to deploy code on top of Kubernetes
2. In Build, select Execute shell for performing this script which will automatically start the respective language interpreter installed image container to deploy code on top of Kubernetes with persistent storage and also exposing the pod for testing
#jenkins #automation #kubernetes #web-server #devops