What plugins are upgraded when upgrading from CJP 1.x to 2.x?

Issue

What plugins are upgraded when I upgrade an instance from CJP 1.x to CJP 2.x?

Environment

  • CloudBees Jenkins Enterprise
  • CloudBees Jenkins Operations Center

Resolution

With the arrival of CJP 2.x, which is based on Jenkins 2.x the behavior related to bundled plugins
(i.e., plugins that are included in the WAR file) has changed:

  • In CJP 1.x every plugin included in the WAR was installed in the system. With CJP 2.x this is no longer the case.
  • Plugin pinning is not available any more.

Thus, the plugins in a CJP 2.x WAR can be classified in required and optional. The expected behavior of each kind
of plugin in an upgrade scenario is described below.

The list of plugins included in the different releases of CJP 2.x can be found in the CJP documentation:

These lists contain the plugin ids, their versions and whether they are required or optional.

When a CJP instance is upgraded from 1.x to 2.x the following operations are performed with regard to plugin upgrades.

Required Plugins

For each of the required plugins included in the WAR the following actions are performed:

  • If the plugin is not installed, the version in the WAR is installed.
  • If the plugin is installed, but in an older version than the one included in the WAR, the
    version is upgraded to the version in the WAR (even if the plugin is pinned).
  • If the plugin is installed in the same of newer version than the one included in the WAR no operation is performed.

Optional Plugins

For each of the optional plugins included in the WAR the following actions are performed:

  • If the plugin is not installed, no operation is performed.
  • If the plugin is installed, but in an older version than the one included in the WAR, the
    plugin is upgraded to the version in the WAR (even if the plugin is pinned).
  • If the plugin is installed in the same of newer version than the one included in the WAR no operation is performed.

In the second case, i.e. when the plugin is upgraded, additional checks are performed in the dependencies.
For each of them:

  • If the dependency is not installed, it is installed.
  • If the dependency is installed, but in an older version than the one included in the WAR, the
    dependency is upgraded to the version in the WAR (even if the plugin is pinned).
  • If the dependency is installed in the same of newer version than the one included in the WAR no operation is performed.

The above behavior depends on the fact that when a plugin is included in the WAR, all of its required dependencies
are also included in the WAR.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.