Jenkins¶
Pre-requirements¶
- OpenShift 4.x cluster
Setup¶
-
From the IBM Cloud cluster dashboard, click the
OpenShift web console
button, -
First we need to create a new project named
jenkins
to deploy the Jenkins service to, -
From the terminal,
oc new-project jenkins
outputs,
$ oc new-project jenkins Now using project "jenkins" on server "https://c107-e.us-south.containers.cloud.ibm.com:31608".
-
Or in the Openshift web console, go to
Home
>Projects
, -
Click
Create Project
-
For
Name
enterjenkins
, forDisplay Name
enterjenkins
, and forDescription
enterjenkins
, -
Click
Create
, - Go to
Operators
>OperatorHub
, -
For
Filter by keyword
enterJenkins
, -
Select the
Jenkins Operator
provided by Red Hat
, labeledcommunity
, -
Click
Continue
toShow Community Operator
, -
Review the operator information, and click
Install
, -
In the
Install Operator
window, in theUpdate Channel
section, selectalpha
underUpdate Channel
, chooseA specific namespace in the cluster
and in theInstalled Namespace
section, select the projectjenkins
from the dropdown, selectAutomatic
underApproval Strategy
, -
Click
Install
, -
The
Installed Operators
page will load, wait until theJenkins Operator
has aStatus
ofSucceeded
, -
Click the installed operator linked
Name
ofJenkins Operator
, -
In the
Provided APIs
section, click theCreate Instance
link in theJenkins
panel, -
In the
Create Jenkins
window, selectForm View
orYAML View
for the new Jenkins instance, change themetadata.name
tomy-jenkins
, accept all other specifications, -
Click
Create
, -
Go to
Networking
>Routes
, and look for a new Routejenkins-my-jenkins
, -
Click the link for
jenkins-my-jenkins
route in theLocation
column, -
A route to your Jenkins instance opens in a new browser window or tab,
- If your page loads with a
Application is not available
warning, your Jenkins instance is still being deployed and you need to wait a little longer, keep trying until the Jenkins page loads, - You can see the progress of the Jenkins startup, by browsing to the Pods of the Deployment of the Jenkins instance that is being created,
-
Click
Log in with OpenShift
, -
Click
Allow selected permissions
, -
Welcome to Jenkins !
-
Configure Jenkins
- Go to Jenkins > Manage Jenkins > Global Tool Configuration,
- Go to the
Maven
section, - Click
Maven Installations
, - If no Maven installer is configured, click
Add Maven
, - Configure the
Name
to bemaven
, check the optionInstall automatically
and select version3.6.3
, - Click Save,