Groovy
Task 6:
- Create container image that’s has Jenkins installed using dockerfile Or You can use the Jenkins Server on RHEL 8/7
- When we launch this image, it should automatically starts Jenkins service in the container.
- Create a job chain of job1, job2, job3 and job4 using build pipeline plugin in Jenkins
- Job2 ( Seed Job ) : Pull the Github repo automatically when some developers push repo to Github.
- Further on jobs should be pipeline using written code using Groovy language by the developer
- Job1 :
1). By looking at the code or program file, Jenkins should automatically start the respective language interpreter installed image container to deploy code on top of Kubernetes ( eg. If code is of PHP, then Jenkins should start the container that has PHP already installed )
2). Expose your pod so that testing team could perform the testing on the pod3). Make the data to remain persistent using PVC ( If server collects some data like logs, other user information ) - Job3 : Test your app if it is working or not.
- Job4 : if app is not working , then send email to developer with error messages and redeploy the application after code is being edited by the developer.
For this task, Jenkins Server is running directly on RHEL8, kubernetes cluster is configured using minikube and kubectl (client) is configured on RHEL8 where jenkins is running.
We need a seed job that will run the groovy script for other jobs
job_6.1 will copy files from github repo to local machine which then be attached to pvc of the launched pod



Comments
Post a Comment