Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-34002

Means of declaring a Pipeline's plugin requirements

XMLWordPrintable

      While a traditional project's config.xml can simply be inspected for plugins it is using, which is useful for example to ensure that the project is not loaded in an inappropriate server, this is not true of Pipeline scripts—steps it uses might be defined in various plugins, or metasteps like checkout might have configuration which refers to various plugins.

      There should be a way for the job itself to declare which plugins it wants loaded. The simplest approach would simply be a step which fails if some of the requested plugins are missing or too old:

      requirePlugins ['junit@1.6', 'parallel-test-executor']
      

      However as this is logically part of the job configuration as a whole, rather than something to be executed at a particular point in the build, it might make more sense as a JobProperty; a build started with missing plugins would immediately fail with an informative message. Using a property does not preclude defining the list from the script itself, using the properties step.

      The configuration form for the property or step could use JENKINS-31582 to inspect the last build and suggest which plugins to list.

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            6 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated: