Skip to content

Latest commit

 

History

History
17 lines (16 loc) · 1.29 KB

File metadata and controls

17 lines (16 loc) · 1.29 KB

Problem Statement

  • Create container image that has Linux and other basic configuration required to run Slave for Jenkins.
  • When we launch the job it should automatically starts job on slave based on the label provided for dynamic approach.
  • Create a Job chain of Job1 & Job2 in Jenkins.
  • Job1 : Pull the GitHub repo automatically when some developers push repo to GitHub and perform the following operations as:
    1. Create the new image dynamically for the application and copy the application code into that corresponding Docker image.
    2. Push that image to the DockerHub (Public repository). ( GitHub code contain the application code and Dockerfile to create a new image )
  • Job2 ( Should be run on the dynamic slave of Jenkins configured with Kubernetes kubectl command): Launch the application on the top of Kubernetes cluster performing following operations:
    1. If launching first time then create a deployment of the pod using the image created in the previous job. Else if deployment already exists then do rollout of the existing pod making zero downtime for the user.
    2. If Application created first time, then Expose the application or else don’t expose it.