项目作者: redhat-developer

项目描述 :
An operator-managed OpenShift Jenkins for OpenShift 4.x
高级语言: Go
项目地址: git://github.com/redhat-developer/openshift-jenkins-operator.git
创建时间: 2019-08-12T20:51:18Z
项目社区:https://github.com/redhat-developer/openshift-jenkins-operator

开源协议:MIT License

下载


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:

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

or

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

Then run this command to run the operator:

  1. 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):

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

Second, identify the route to the Jenkins console:

  1. oc get routes -o jsonpath='{range .items[*].spec}{"https://"}{.host}{end}{":443\n"}'
  2. 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:

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