Docker Jenkins Github Integration using Kubernetes

Ankit Prakash
2 min readOct 14, 2020

Create container image that has Jenkins installed using dockerfile

Docker ps

When we launch this image, it should automatically starts Jenkins service in the container.

Job1 : Pull the Github repo automatically when some developers push repo to Github.

JOB 2: This job will run the container on top of kubernetes by checking if html or php code is required. eg. If code is of PHP, then Jenkins should start the container that has PHP already installed

JOB 3: This job will test if the web server is running properly or not. Here the concept of httpd_code is used to retrieve the code for the confirmation of the webserver. If the webserver is not working properly a mail will be automatically sent to the developer.

JOB 4: If the job fails it will automatically run the kubernetes container .

pipeline

--

--