This is a demo Jenkins Pipeline for a containerized ruby on rails app, & includes the following stags:
- Development Build & run unit tests
- Build the prod docker image
- Push the image to docker hub
- Deploy the app to the staging ENV (staging namespace)
- Deploy the app to the prod ENV (prod namespace) "Asks for confirmation"
As required by the task, Here is the Kubernetes yaml
- The work has been done on a
Test K8s cluster
which also hosts Jenkins - 3 namespaces has been used:
- build
->
Used by Jenkins to build the app (it utilized k8s pods as agent)- Also used to deploy the app on both staging & prod namespaces
- staging
->
imitation of the staging environment - prod
->
imitation of the production environment
- build
Staging URL: https://staging-app.demo.devops-caffe.com
Production URL: https://prod-app.demo.devops-caffe.com
Jenkins URL: https://jenkins.demo.devops-caffe.com/jenkins/
admin
password
Where the images are pushed: Docker hub
Since this is a "Proof of concept" pipeline, Trigger the pipeline manually
NOTE -- Github & Docker hub Credentials are removed from Jenkins
Thank you