Category: Software, Docker, Jenkins, container, github, automation

In this article we would be automating the complete deployment of a web server via CI/CD pipeline and then deployment of the web app, and the server for the app would be launched inside the docker container, and all of this would be automated by jenkins that would also be launched inside a container and will control the tasks on the base OS via ssh. And in the end we will put all the job in a single BUILD Pipeline which would look something like this:- So now our first goal is to launch a container that has Jenkins installed in it, and for that we have make some changes in the existing docker images and for the sake of automation we also can’t go inside the container of a base OS and make changes, so we have to use Dockerfile , it is the official scripting language by Docker to make customized images according to the need,so with the help of Dockerfile we can achieve our goal that is jenkins installed inside a image and Jenkins service automatically starts upon launching of the container.

Now using grep keyword we will fetch the information from this page which is useful to us and that information is to determine the success of previous task that was that task successfully completed or not. and if the status is not equal to 200 we have to send a mail to the developer so upon every failure of this job a mail would be sent to the developer and for that you have to setup smtp mail server in the jenkins and then you can use it send POST-BUILD notifications like this

Related Articles