TASK 1 - DevOps
Problem Statement :
JOB 1: If Developer push to dev branch then Jenkins will fetch from dev and deploy on dev-docker environment.
JOB 2 : If Developer push to master branch then Jenkins will fetch from master and deploy on master-docker environment. Both dev-docker and master-docker environment are on different docker containers.
JOB 3 : Manually the QA team will check (test) for the website running in dev-docker environment. If it is running fine then Jenkins will merge the dev branch to master branch and trigger #job 2
Technologies used:-
- Git and GitHub
- Docker
- Jenkins
Step 1: Developer commits the code
Step 2: Create a hook to push
Fig: Inside post-commit file (used ngrok for tunneling the network)
So, after this when ever the Developer will commit the code then “post-commit” will directly push the code to GitHub and after that the Jenkins will start their Job or their Build Pipeline.
Job 1:
Fig: Pulling from Dev1 node
Fig: Used Authentication Token for trigger
Fig: Copying the Dev1 content in web folder
Job 2:
Fig: Pulling from master node
Fig: Job2 will trigger only after Job1 runs fine
Fig: Copying the Master content in web folder
Job 3:
Fig: Job3 will trigger only after Job2 runs fine
Fig: Giving credentials to login into GitHub
Fig: Merging the Dev1 branch to Master branch
Build Pipeline of the Task
Fig: All Jobs run successfully
Fig: Final Webpage