/!\ This file should be updated
Demonstrate CICD pipeline in Openshift. This demonstration includes the following cases:
- Jenkins pipeline
- Build
- Deployment
- Unit testing
- Static Code Analysis
- Promotion
- Approval
- Pipeline Webhook
- Authorizations
- Resources Quotas
- Autoscaling (Under construction)
The CI/CD tools used in this demonstration are:
- Jenkins - Automation server
- Nexus - Repository
- Gitlab - Source code management
- SonarQube - Static code analysis
- Have an OpenShift instance running. This could be :
- OpenShift Container Platform
- OpenShift Origin
- Minishift
- Git installed
- Openshift User Accounts created: admin_cicd, dev_cicd, test_cicd, production_cicd.
- Persistent volumes created:
- gitlab-volume
- gitlab1-volume
- gitlab2-volume
- gitlab3-volume
- jenkins-volume
- nexus3-pv
- sonarqube-pv
The images below are used in this demonstration. In order to speed up the deployment of this demonstration it is advised to import the images before.
gitlab/gitlab-ce [https://hub.docker.com/r/gitlab/gitlab-ce/]
rhscl/postgresql-94-rhel7 [https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/postgresql-94-rhel7]
rhscl/mysql-56-rhel7 [https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/mysql-57-rhel7]
docker.io/sonarqube:6.3 [https://hub.docker.com/_/sonarqube/]
openshift3/jenkins-2-rhel7 (Already imported while OCP installed)
- Connect to your Openshift Master as system:admin.
oc login -u system:admin
- Clone this repository
git clone https://github.com/clerixmaxime/pipeline-example.git
cd ./pipeline-example
git branch angular-todo
- /!\ Currently, the definition of the pipeline does not use variable. You should verify that the application sub_domain of your Openshift match the one defined in the jenkins file for Gitlab URL line 43 and 53 in pipeline-definition.yml. If it is not the case, make a copy of this file, put it online on your own git (fork this repository) and modify the value to match your Openshift configuration. In cicd_deployment.sh or cicd_deployment_light.sh mofidy the line 33 to add the right PIPELINE_URL.
- Execute cicd_deployment_light.sh. The script will deploy the whole CI/CD stack, configure the environments, populate Gitlab and create the pipeline.
bash cicd_deployment_light.sh
ou./cicd_deployment_light.sh
- The demonstration should be up with the whole CI/CD stack running in the project cicd and 3 environments development, test and production created.
refers to STORY.md
file