OpenShift CI/CD Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 8: Line 8:
=Organizatorium=
=Organizatorium=


  oc new-project CICD --display-name="CI/CD pipeline with Jenkins"
  oc new-project cicd --display-name="CI/CD pipeline with Jenkins"
  oc new-project CICD-dev --display-name="Dev project (openshift-tasks) to showcase CI/CD pipeline with Jenkins"
  oc new-project cicd-dev --display-name="Dev project (openshift-tasks) to showcase CI/CD pipeline with Jenkins"
  oc new-project CICD-stage --display-name="Stage project (openshift-tasks) to showcase CI/CD pipeline with Jenkins"
  oc new-project cicd-stage --display-name="Stage project (openshift-tasks) to showcase CI/CD pipeline with Jenkins"
 
The Jenkins container must be able to access the OpenShift API:
 
oc policy add-role-to-user edit system:service account:cicd:default -n cicd
oc policy add-role-to-user edit system:service account:cicd:default -n cicd-dev
oc policy add-role-to-user edit system:service account:cicd:default -n cicd-stage
 
 
oc project cicd
 
Instantiate components. Use templates. 'cicd-github-template.yaml'.
 
oc process -f https://raw.githubusercontent.com/OpenShiftDemos/openshift-cd-demo/master/cicd-github-template.yaml

Revision as of 23:16, 31 October 2017

Internal

Overview

Organizatorium

oc new-project cicd --display-name="CI/CD pipeline with Jenkins"
oc new-project cicd-dev --display-name="Dev project (openshift-tasks) to showcase CI/CD pipeline with Jenkins"
oc new-project cicd-stage --display-name="Stage project (openshift-tasks) to showcase CI/CD pipeline with Jenkins"

The Jenkins container must be able to access the OpenShift API:

oc policy add-role-to-user edit system:service account:cicd:default -n cicd
oc policy add-role-to-user edit system:service account:cicd:default -n cicd-dev
oc policy add-role-to-user edit system:service account:cicd:default -n cicd-stage


oc project cicd

Instantiate components. Use templates. 'cicd-github-template.yaml'.

oc process -f https://raw.githubusercontent.com/OpenShiftDemos/openshift-cd-demo/master/cicd-github-template.yaml