Kubernetes Jenkins Integration

Task Description

 

1.    Create container image that has Jenkins installed using DockerFile or Jenkins server can be used on RHEL8.

 

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

 

3.    Create a job chain create a Job chain of Job1, Job2, Job3 and Job4 using build pipeline plugin in Jenkins.

 

a.    Job1 – Pull the Github repo automatically when some developers push repo in github.

b.   Job2 –

                                                   i.     By looking at the code or program file. Jenkins should automatically start the respective language interpreter installed image to container to deploy code on top of kubernetes. (If code is of PHP then Jenkins should automatically start the container that has PHP installed in it.)

                                                 ii.     Expose the pod so that testing team could perform the testing on the pod.

                                               iii.     Make the data to remain persistent. (if server collects some data like logs, other user information)

c.    Job3 – Test your app if it is working or not.

d.   Job4 – If app is not working then send an email to developer with error message and redeploy the application after code is being edited by the developer.


Building The Project


  Create container image that has Jenkins installed using DockerFile or Jenkins server can be used on RHEL8.


After building the DockerFile Jenkins will be installed. 




The image is Builded successfully now let's launch the container with Docker.
        

docker run -it --name Jenkins -p 3211:8080 name/file:v1

The image will be build and then we have to unlock JENKINS with a password file.







Now the second dockerfile with Webserver installed.


Pulling the github repo automatically when the deeveloper push.







Making Volume Persistent











Confirming the file type - 





Response from Server -



E-mail From Jenkins - 



Web Page






Email - Notification -













Comments