OpenShift CI/CD Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 10: Line 10:
==Create Required Image Streams==
==Create Required Image Streams==


{{OpenShift_Image_and_ImageStream_Operations#Create_an_Image_Stream|Create an Image Stream}}
{{Internal|OpenShift_Image_and_ImageStream_Operations#Create_an_Image_Stream|Create an Image Stream}}


=Organizatorium=
=Organizatorium=

Revision as of 16:38, 1 November 2017

Internal

Overview

Set Up a Jenkins CI/CD Pipeline

Create Required Image Streams

Create an Image Stream

Organizatorium

Pre-requisite: JBoss EAP 7 imagestream imported to OpenShift.

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 | oc create -f - 


Inspect Nexus

Inspect Jenkins