This plugin integrates CloudBees CD/RO with Helm, the Helm package manager for Kubernetes.
There are three primary concepts:
-
A chart is a Helm package. It contains all resource definitions necessary to run an application, tool, or service inside a Kubernetes cluster. Think of it like the Kubernetes equivalent of a Homebrew formula, an Apt dpkg, or a Yum RPM file.
-
A repository is the place where charts can be collected and shared. It is like the Perl CPAN archive or the Fedora Package Database, but for Kubernetes packages.
-
A release is an instance of a chart running in a Kubernetes cluster. One chart can often be installed many times into the same cluster; each time it is installed, a new release is created. This is similar to a MySQL chart; if you want two databases running in your cluster, you can install the chart twice. Each one has its own release, which in turn has its own release name.
With these concepts in mind, Helm installs charts into Kubernetes, creating a new release for each installation. To find new charts, you can search Helm chart repositories.
Plugin version 1.7.0.2023030143
Revised on March 01, 2023
Supported versions
The plugin has been tested with the following versions:
-
v3.10.0
-
v3.8.1
-
v3.5.0
-
v3.4.0
Plugin configurations
Plugin configurations are sets of parameters that can be applied across some, or all, of the plugin procedures. They can reduce the repetition of common values, create predefined parameter sets, and securely store credentials. Each configuration is given a unique name that is entered in the designated parameter for the plugin procedures that use them.
Creating plugin configurations
To create plugin configurations in CloudBees CD/RO, complete the following steps:
-
Navigate to
. -
Select Add plugin configuration to create a new configuration.
-
In the New Configuration window, specify a Name for the configuration.
-
Select the Project that the configuration belongs to.
-
Optionally, add a Description for the configuration.
-
Select the appropriate Plugin for the configuration.
-
Configure the parameters per the descriptions below.
Configuration procedure parameters
Parameter | Description |
---|---|
Configuration name |
Required. The name for the created configuration. |
Description |
The description for the configuration. |
Helm executable path |
Required. An absolute or relative path to the Helm executable. |
Kubectl executable path |
The absolute path to the kubectl executable. Kubectl is only used as a fallback option to retrieve pod information in the microservice deployment when the Helm-generated manifest cannot be parsed with the current Perl YAML libraries. If the value is empty, the executable is looked up in the PATH environment variable. |
Helm version |
Required. The version of the Helm client. The actual version is checked via Check Connection . |
Options |
The options to pass to the Helm executable. For example, --option-name[=parameter] . |
Config file |
The configuration file that should be used.
|
Config file location |
The path to a kubectl configuration file. Examples:
|
Config file content |
The content of the kubectl configuration file to use to connect to the cluster. |
Kubeconfig Context |
Context used by Kubectl to run against the cluster. |
Check connection resource |
The resource that is used to check the connection. |
Check Connection? |
If checked, the connection endpoint and credentials entered as part of the configuration will be tested. If this option is checked, configuration will not be saved if the test fails. |
Debug level |
This option sets the debug level for logs. If |
Plugin procedures
Install Chart
Installs a chart archive.
Install Chart parameters
Parameter | Description |
---|---|
Configuration name |
Required. The unique name for the configuration. |
Release name |
Required. The name of the release to deploy. |
Chart |
Required. Specifies the chart to install. The following methods can be used:
|
Options |
The options to pass to the Helm executable. For example, |
Values |
Specify the content for a YAML file that will be passed to the command. |
Result property sheet |
Required. Results are saved into this property/property sheet. |
Upgrade Release
Upgrades a release to a specified version of a chart and/or updates chart values.
Upgrade Release parameters
Parameter | Description |
---|---|
Configuration name |
The unique name for the configuration. |
Release name |
Required. The release name. |
Chart |
Required. Specifies the chart to install. The following methods can be used:
|
Options |
The options to pass to the Helm executable. For example, |
Values |
Specify the content for a YAML file that will be passed to the command. |
Result property sheet |
Required. Results are saved into this property/property sheet. |
Delete Release
Deletes a release from Kubernetes. It removes all of the resources associated with the last release of the chart.
Delete Release parameters
Parameter | Description |
---|---|
Configuration name |
Required. The unique name for the configuration. |
Release name |
Required. The release name. |
Options |
The options to pass to the Helm executable. For example, |
Action on error |
Required. Ignores errors if they are expected. For example, if a repository is already present or an item to be deleted does not exist. |
Error value |
A pattern that triggers the Action on error condition. |
Result property sheet |
Required. Results are saved into this property/property sheet. |
Rollback Release
Rolls back a release to a previous revision.
Rollback Release parameters
Parameter | Description |
---|---|
Configuration name |
Required. The unique name for the configuration. |
Release name |
Required. The release name. |
Revision number |
Required. A revision (version) number of the release. |
Options |
The options to pass to the Helm executable. For example, |
Result property sheet |
Required. Results are saved into this property/property sheet. |
Run Custom Command
Run any Helm command.
Run Custom Command parameters
Parameter | Description |
---|---|
Configuration name |
Required. The unique name for the configuration. |
Command |
Required. The name of the command. |
Arguments |
Arguments to pass to the Helm executable for the command. |
Options |
The options to pass to the Helm executable. For example, |
Values |
Specify the content for a YAML file that will be passed to the command. |
Action on error |
Required. Allows ignoring errors when they are expected. For example, the repository is already present or an item to delete does not exist. |
Error value |
A pattern that triggers the Action on error condition. |
Result property sheet |
Required. Results are saved into this property/property sheet. |
Microservice deployment
Plugin allows deploying Helm charts into Kubernetes clusters. Clusters should be part of an Environment and have 'Helm - Kubernetes' in the cluster definition.
Microservice deployment uses 'upgrade --install' command to support both fresh and upgrade deployments. Deployment parameter 'Additional Options' can be used to provide list of flags and options for the deployment command. Content of the 'Values' parameter will be saved to a file and passed to the command with the '-f <fileName>' option.
Parameters will be prepended to the command in following order, which means options that are prepended later can override values set in previous options.
-
File supplied by the deployment 'Values' parameter
-
Configuration 'Options'
-
Deployment 'Additional Options'
-
Cluster definition 'Namespace' parameter
-
Cluster definition 'Kubeconfig Context' parameter
Optionally, rollback can be enabled with a specified timeout. When rollback is enabled, the --atomic parameter is added to the 'upgrade --install' command.
After invoking 'upgrade --install' command, the plugin procedure invokes set of commands to retrieve the deployment details:
-
Release details: 'list -l <releaseName>'
-
Notes: 'get notes <releaseName>'
-
Values: 'get values <releaseName>'
-
Manifests: 'get manifest <releaseName>'
Release manifests are parsed in order to get list of containers that were deployed with this release. These containers are reported to the Environment Inventory.
Because different yaml libraries have different implementation of the YAML specification, some manifests accepted by Kubernetes may not be parsed by Perl libraries used in the plugin. If you have warnings about specific yaml file that has containers, and the chart is under your governance, you can provide proper formatting and linting for the chart template to fix parse error. For charts provided by a third party provider, please file an issue for the maintainer.
In case when plugin fails to parse manifest for one of the generated yaml files, and it contains container spec, this container will not be reported to the inventory.
Use cases
Pipeline

Stage: Installation
Step: get release status

STDOUT:
LAST DEPLOYED: Tue Jan 21 12:47:29 2020
NAMESPACE: cloudbees-core
STATUS: DEPLOYED
RESOURCES:
==> v1/ClusterRole
NAME AGE
cjoc-master-management-cloudbees-core 59s
==> v1/ClusterRoleBinding
NAME AGE
cjoc-role-binding-cloudbees-core 59s
==> v1/ConfigMap
NAME AGE
cjoc-configure-jenkins-groovy 60s
jenkins-agent 60s
==> v1/Pod(related)
NAME AGE
cjoc-0 56s
==> v1/Role
NAME AGE
cjoc-agents 58s
cjoc-master-management 58s
==> v1/RoleBinding
NAME AGE
cjoc-master-role-binding 57s
cjoc-role-binding 57s
==> v1/Service
NAME AGE
cjoc 57s
==> v1/ServiceAccount
NAME AGE
cjoc 60s
jenkins 60s
==> v1/StatefulSet
NAME AGE
cjoc 56s
==> v1beta1/Ingress
NAME AGE
cjoc 55s
NOTES:
-
Once Operations Center is up and running, get your initial admin user password by running:
kubectl rollout status sts cjoc kubectl exec cjoc-0 -- sh -c "until cat /var/jenkins_home/secrets/initialAdminPassword 2>&-; do sleep 5; done"
-
Visit http://35.196.144.25.xip.io/cjoc
-
Login with the admin user password.
For more information on running CloudBees CI on Kubernetes, see the CloudBees CI on modern cloud platforms administration guide. Configure the Kubernetes plugin in Jenkins to use the following Service Account name cjoc using the following steps: . Create a Jenkins credential of type Kubernetes service account with service account name cjoc. . Under configure Jenkins — Update the credentials config in the cloud section to use the service account credential you created in the step above.
OpenShift: Deploy Jenkins using Helm v3
Demonstrating how Microservices can be deployed to OpenShift cluster. In this example we will deploy Jenkins on OpenShift cluster.
Create and define environment

Define a cluster in the created environment:


Add and define Utility Resource in the environment:



Created and defined environment:

Check inventory

You can check deploy status via oc CLI
$ oc status
In project default on server https://xx.xx.xxx.xxx
svc/myrelease-jenkins-agent - 10.7.253.124:50000
svc/myrelease-jenkins - 10.7.248.179:8080
statefulset/myrelease-jenkins manages jenkins/jenkins:2.277.3-jdk11,kiwigrid/k8s-sidecar:0.1.275
created 9 minutes ago - 1 pod
$ oc get pods
NAME READY STATUS RESTARTS AGE
myrelease-jenkins-0 2/2 Running 0 13m
Known issues
Release notes
EC-Helm 1.6.0
-
Added handling for "Use Existing" config file case
-
Added the Kubeconfig Context parameter to plugin configuration.
-
Deprecated the Kubeconfig context parameter in Cluster Reference form in Microservices.
-
Fixed security issue.
-
Fixed hard-coded actionOnError parameter.
EC-Helm 1.5.1
-
Fixed application deployment on agents in version 10.5.
-
Fixed removing duplicate parameters in the microservice definition form.
EC-Helm 1.3.0
-
Added optional auto-rollback support for Microservices.
-
Cosmetic UI changes were made to the Create Configuration procedure.
-
Improvements were made to retain the environment inventory in its actual state.
-
Added a Chart Version parameter to the microservice definition form.
-
Added the OpenShift: Deploying Jenkins using Helm v3 use case to the documentation.