Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.

Latest commit

 

History

History
61 lines (43 loc) · 1.87 KB

README.md

File metadata and controls

61 lines (43 loc) · 1.87 KB

Docker Repository on Quay Quality Gate Status

openshift-jenkins-operator

An operator-managed OpenShift Jenkins for OpenShift 4.x

Requirements

Installation

Running Locally

To run the operator locally, you need to have your OpenShift clusters active by running either of these commands:

# This sets your active credentials in ~/.kube/config
oc login your-server -u your-user -p your-password

or

export KUBECONFIG=/home/user/path/to/kubeconfig`

Then run this command to run the operator:

make run-local

Access the Jenkins web UI when Running Locally

Follow these steps to access the Jenkins web UI:

First, create the Jenkins custom resource (CR):

oc create -f deploy/crds/jenkins_ephemeral_v1alpha1_jenkins_cr.yaml
jenkins.jenkins.dev/example-jenkins created

Second, identify the route to the Jenkins console:

oc get routes -o jsonpath='{range .items[*].spec}{"https://"}{.host}{end}{":443\n"}'
https://example-jenkins-jenkins-demo.apps.my-cluster.testcluster.openshift.com:443

And then, navigate to the route in your browser. You will be redirected by Jenkins to log into the OpenShift console before the Jenkins console web UI is opened.

Creating a Pipeline

Creating a new project that defines a pipeline (for example, through a project's JenkinsFile) will automatically create a job and build in the Operator managed instance of Jenkins.

For example:

oc new-app https://github.com/waveywaves/nodejs-ex --context-dir openshift/pipelines