This repository contains simple python flask application with few endpoints and the Dcokerfile to package python app inside it.
Steps to setup the Pipeline are as Follows:
-
Install and configure Jenkins master slave on any server
-
Install below plugins to ensure the all functionalities required for the Pipeline
- Docker
- Github
- Kubernetes plugin
- Amazon EC2 plugin
- Docker-build-Step
- Github branch source plugins
- etc
-
Configure Docker hub credentials
-
Configure Github secrets credentials
-
Configure Kubernetes configuration(kubeconfig)
-
Crate Multi-branch pipeline job
-
Configure git repository and setup poll scm frequency to every minute to ensure all commits are getting build OR setup Webhooks in the Github repository to jenkins URL.
-
Set Jenkinsfile path
-
Save the Jenkins job
-
Job will do initial scan of the repository and create pipeline for all branches which are having Jenkinsfile at the specified path
-
Jenkins jobs will be triggered and execute all the stages mentioned in the Jenkinsfile