Jenkins Master

The following customizations are applied to enable more automatic deployment of Jenkins.

Configured Plugins

We have included some base plugins

token-macro:2.3

greenballs:1.15

credentials-binding:1.18

email-ext:2.63

sonar:2.6.1

ansicolor:0.5.2

workflow-cps-global-lib:2.13

junit:1.28

blueocean:1.18.0

workflow-durable-task-step:2.28

openshift-sync:1.0.44

Init scripts

Jenkins offers to deploy post-initialization scripts.

Table 1. Table Post-Initialization Scripts
Script Description

url.groovy

Sets the Jenkins location based on the OpenShift route

sonarqube.groovy

Sets the SonarQube server URL and auth token based on the exposed environment variables

ods-jenkins-shared-library.groovy

Registers ods-jenkins-shared-library as a global library

The following environment variables must be available to Jenkins:

SONAR_SERVER_URL

specifies the location of the SonarQube server.

SONAR_AUTH_TOKEN

this is the SonarQube auth token that is generated when deploying and configuring sonarqube

Email notifications

Jenkins email notifications need manual configuration:

  1. The SMTP server parameters that need to be defined are found under menu option: JenkinsManage JenkinsConfigure SystemExtended E-mail Notification

  2. It is also mandatory to define the System Admin e-mail address, this is defined under menu option: JenkinsManage JenkinsConfigure SystemJenkins Location

  3. Once Jenkins is configured, you will also need to define the recipients of the email notifications by definining emailextRecipients parameter in your odsComponentPipeline context, in your components' Jenkinsfile, like:

...

odsComponentPipeline(
  ...

  emailextRecipients: ['email1@foo.bar', 'email2@foo.bar'],

  ...
) { context ->

...