Setting up testing environment using Docker + Jenkins + Github

Setting up testing environment using Docker + Jenkins + Github

In an Organization When multiple developers are working on code or project its very essential that it has to be tested in a testing environment meeting all requirement before deploying it to the production phase. For that we can first test our code on one testing environment and only after testing pass we can merge our work with our main code . For these tasks I have created , built multiple jobs in Jenkins in order to automate the process.

JOB 1

After pushing dev branch data from git to github . Jenkins will automatically take the code from github dev branch and deploy into dev docker container . For that I first link the job1 with source code management tool - github repo and link the job1 with dev branch.

No alt text provided for this image
No alt text provided for this image

After that in build execute I have fetch the code and then deploy a dev testing container with the code.

No alt text provided for this image

I made this job to run after every 1 minute so that everytime the code uploaded on github it will This job has to run periodically i.e. every minute in order to fetch the upload code from github.

No alt text provided for this image

JOB 2

Job 2 will be same as job 1 but master and dev branch code will be on different docker containers.

No alt text provided for this image

JOB 3

Now when we check the website of dev branch code . if its working fine that means our testing is good and we can merge the master and dev branch work for that for that i add credentials with git repositary url and merge the dev branch code to our main work that is master environment.

No alt text provided for this image
No alt text provided for this image

And at last , build all three jobs and then testing environment will be set up with integrated tools using docker + Jenkins + Github.

Muskan Agarwal

Business Technology Solutions Associate Consultant @ ZS Pune

4 年

Great work!

要查看或添加评论,请登录

Sandeep Singh Rajawat的更多文章

社区洞察

其他会员也浏览了