How to push plugins to a new client controller added to a JOC?

1 minute read

Issue

What is the recommended approach for pushing plugins when a new controller is added under an existing JOC?

Environment

  • CloudBees Jenkins Operations Center

  • CloudBees Jenkins Enterprise

Resolution

With Cluster Operations, you can push plugin installations from CJOC to a Client controller.

Basically, from CJOC you can create a push operation by following this procedure:

  • Click New Item then Cluster Operations

  • Under Add Operation click controllers

  • Under Step, click Add Step then Install Plugin/Upgrade all plugins/…​

Examples

For these examples, we have configured a hosted update center, uploaded and promoted one plugin.

updatecenter.png

Parameterized Cluster Operation. String Parameters

  • Step 1. Create new Cluster Operation.

  • Step 2. If you want to be able to set which plugin you want to install on the controllers, you have to check This build is parameterized and add two params.

install-parametrized-plugin-job-params.png
  • Step 3. Leave the Install plugin untouched because they have to match with parameters.

install-parametrized-plugin-job-step.png
  • Step 4. You can find plugin-id and plugin version at plugin documentation.

plugin-id-and-version.png
  • Step 5. When you build the job, you will be asked for plugin-id and version.

job-build-screen.png
  • Step 6. The plugin will be installed on controllers.

thinBackup-installed-on-controller.png

Parameterized Cluster Operation. Jenkins plugin name and version stored in hosted update center.

This parameter has a particular behavior. When is used, you are able to choose which plugin from a hosted update center is desired to be pushed to one or more Client controller.

  • Step 1. Create new Cluster Operation parameterized (JENKINS_PLUGIN)

parameters.png
  • Step 2. Use the same name for both of them (${JENKINS_PLUGIN}):

step.png
  • Step 3. When you build the job, you will ask for one plugin of your hosted update center:

build.png