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.
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 |
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:
-
The
SMTP server parameters
that need to be defined are found under menu option:Jenkins
→Manage Jenkins
→Configure System
→Extended E-mail Notification
-
It is also mandatory to define the
System Admin e-mail address
, this is defined under menu option:Jenkins
→Manage Jenkins
→Configure System
→Jenkins Location
-
Once Jenkins is configured, you will also need to define the recipients of the email notifications by definining
emailextRecipients
parameter in yourodsComponentPipeline
context, in your components'Jenkinsfile
, like:
...
odsComponentPipeline(
...
emailextRecipients: ['email1@foo.bar', 'email2@foo.bar'],
...
) { context ->
...