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

Log / document the plugin usage in the flow nodes

      Jenkins adds the plugin names and versions to the XML configuration, e.g. like plugin="groovy@1.27". Analyzing config.xml files it is possible to see what pluins are used by a job.

      With workflow this is not possible, since the information what plugin is used, is in the script file. It is probably difficult to analyze the script statically and extract plugin information.

      However, when a script is executed, workflow has the needed information. The steps are already logged to builds/<job-id>/workflow/<step-id>.xml.

      For a git checkout, via the generic SCM API it logs:

      <?xml version='1.0' encoding='UTF-8'?>
      <org.jenkinsci.plugins.workflow.support.storage.SimpleXStreamFlowNodeStorage_-Tag plugin="workflow-support@1.11">
        <node class="org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode" plugin="workflow-cps@1.11">
          <parents class="com.google.common.collect.ImmutableList">
            <org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode>5</org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode>
          </parents>
          <id>6</id>
          <descriptorId>org.jenkinsci.plugins.workflow.steps.scm.GenericSCMStep</descriptorId>
        </node>
      ...
      

      Improvement:

      Each step node contains also the used plugin(s) and version. In the above case it needs to log workflow-scm-step and git.

          [JENKINS-31582] Log / document the plugin usage in the flow nodes

          Jens Wilke created issue -
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-33995 [ JENKINS-33995 ]
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-34002 [ JENKINS-34002 ]
          Jesse Glick made changes -
          Labels New: api
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-28293 [ JENKINS-28293 ]
          Jesse Glick made changes -
          Epic Link New: JENKINS-35400 [ 171193 ]
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-29922 [ JENKINS-29922 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 167007 ] New: JNJira + In-Review [ 182547 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Jesse Glick made changes -
          Component/s New: workflow-api-plugin [ 21711 ]
          Component/s New: workflow-cps-plugin [ 21713 ]
          Component/s Original: pipeline [ 21692 ]

            jglick Jesse Glick
            cruftex Jens Wilke
            Votes:
            4 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: