GitHub, Jenkins,Docker Integration
Misha goyal
R&D Engineer @Nokia | Kubernetes & Docker Professional | Helm, Shell Scripting, Python, & Ansible Enthusiast | Expert in Cloud-Native Automation & DevOps
This is the very first task provided by our mentor Mr. Vimal Daga sir. In this task I created a project which have a small example of industry use case. Here I have two environments where one is for production and another is testing environment. This is done by using docker containers. And the other tools used are github and Jenkins. Jenkins is used for automation of the complete work.
What is the idea of my project and how I implemented it:
I have used GitHub as the Source code Management tool in my project. I used the Git Bash tool to push my files to GitHub. I have made one post-commit hook using this tool, this will automatically push the file by just using git commit command, there is no need to push it every time.
Then the other requirement was to make branches, as we need two branches production branch which is the master branch and other is developer branch. This we have to do so the developers will write their code and submit in developer branch and if the testing team finds it correct only then the files are merged.
Further to do the above stated task I used Jenkins as it will automate all the task. My Jenkins will launch one docker container to submit the new tasks of the developers and the production department.
The first job that I created in Jenkins will keep checking for new updates from developers and when found them put them into the docker container. For the first time when developer commits the Jenkins will launch the docker container automatically and after that whenever there is new commit , the Jenkins check if the docker container is running or not. If it is running the Jenkins will put the files in it , and if not then Jenkins launches the new docker container automatically.
The second job in Jenkins will do same things as the first job, the only difference is that this job will do the same tasks for master or production branch.
if the developer code is correct and working fine then it Then the third job which I created is to do the task of merging the two branches. This task is for the QAT Quality assurance team, as they will check that will merge that work into the master branch.
Lastly I have used ngrok to make a tunnel so that the git can directly trigger the job when developer pushed something on GitHub. Then the respective job will be triggered automatically.
At last i would like to thank our mentor Mr. Vimal Daga for providing us with such unique opportunities to improve our skills and make us learn new tools and technologies.