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

Set an environment variable listing all installed plugins

      It would be nice to have a simple and generic way for build steps to find out what plugins are installed. For example, shell build steps could enable ANSI color output for the tools they call if the ansicolor plugin [1] was installed, or they could disable timing in the tools they call if the timestamper plugin [2] was installed.

      A simple and generic way to allow for this would be to add a "JENKINS_PLUGINS" variable to the list at [3], set to a whitespace separated list of plugin IDs for all installed plugins. A build step could then check that environment variable for a plugin ID and take actions accordingly.

      [1] https://wiki.jenkins-ci.org/display/JENKINS/AnsiColor+Plugin
      [2] https://wiki.jenkins-ci.org/display/JENKINS/Timestamper
      [3] https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-JenkinsSetEnvironmentVariables

          [JENKINS-23187] Set an environment variable listing all installed plugins

          Oleg Nenashev added a comment - - edited

          This feature should be implemented in a plugin, no need to keep it withing the core.
          I propose to take a look on http://wiki.hudson-ci.org/display/HUDSON/DumpInfo+BuildWrapper+Plugin
          This plugin could be improved for your case

          Oleg Nenashev added a comment - - edited This feature should be implemented in a plugin, no need to keep it withing the core. I propose to take a look on http://wiki.hudson-ci.org/display/HUDSON/DumpInfo+BuildWrapper+Plugin This plugin could be improved for your case

          To me, the need to install a plugin in order to list all plugins seems odd. This is a lightweight feature, and other variables are also set in core. Moreover, the DumpInfo plugin (Jenkins version is at [1]) seems to be be rather unmaintained with the last release from Jan 30, 2011.

          [1] https://wiki.jenkins-ci.org/display/JENKINS/DumpInfo+BuildWrapper+Plugin

          Sebastian Schuberth added a comment - To me, the need to install a plugin in order to list all plugins seems odd. This is a lightweight feature, and other variables are also set in core. Moreover, the DumpInfo plugin (Jenkins version is at [1] ) seems to be be rather unmaintained with the last release from Jan 30, 2011. [1] https://wiki.jenkins-ci.org/display/JENKINS/DumpInfo+BuildWrapper+Plugin

          Oleg Nenashev added a comment - - edited

          The plugin approach is much more preferable, because...

          • The features in plugins do not depend from the core development cycle (which is very unflexible)
          • Users with old core versions will be able to use it
          • Jenkins does not spam user installations by additional wrappers they don't need
          • ...

          If the proposed plugin does not suit you, please feel free to find another one or request the creation of a new plugin.
          Any other contributions like the feature implementation will be appreciated as well

          Oleg Nenashev added a comment - - edited The plugin approach is much more preferable, because... The features in plugins do not depend from the core development cycle (which is very unflexible) Users with old core versions will be able to use it Jenkins does not spam user installations by additional wrappers they don't need ... If the proposed plugin does not suit you, please feel free to find another one or request the creation of a new plugin. Any other contributions like the feature implementation will be appreciated as well

            Unassigned Unassigned
            sschuberth Sebastian Schuberth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: