openshift-jenkins-operator

module
v0.0.0-...-530e6f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2020 License: MIT

README

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

Directories

Path Synopsis
cmd
manager command
pkg
apis/jenkins
Package jenkins contains jenkins API versions.
Package jenkins contains jenkins API versions.
apis/jenkins/v1alpha1
Package v1alpha1 contains API Schema definitions for the jenkins v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=jenkins.dev Package v1alpha1 contains API Schema definitions for the jenkins v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=jenkins.dev
Package v1alpha1 contains API Schema definitions for the jenkins v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=jenkins.dev Package v1alpha1 contains API Schema definitions for the jenkins v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=jenkins.dev
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL