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

Missing Jenkins API support for reading fingerprints of pipeline build

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core, pipeline
    • Labels:
      None
    • Similar Issues:

      Description

      Pipeline builds are able to record Jenkins fingerprints and those can be accessed with the Web UI of a particular build.

      However they are not accesible via Jenkins api, which prevents using them by any automated tools.

      The reason for this is that FingerprintAction is not annotated with ExportedBean and the api does not publish it directly. Instead AbstractBuild has a method getBuildFingerprints which is @Exported as fingerprint with visibility -1. This way the developer excludes them from standard view but it is accesible via tree parameter. See https://issues.jenkins-ci.org/browse/JENKINS-10481 for reference.

      Since WorkflowRun does not inherit from AbstractBuild it does not inherit this method and the fingerprints are not accesible.

      Therefore could you please just add a similar method to WorkflowRun to make fingerprints accessible? 
      The alternative would be to make FingerprintsAction exported directly, but maybe this is not wanted.

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          The method could be promoted to the Run level in directly the core (may also need renaming).
          LocationChanged() handler for fingerprints could be also generalized then: https://github.com/jenkinsci/jenkins/blob/d4737b2b60438ce0e3cb7a8a6f26675f7c880914/core/src/main/java/hudson/model/Fingerprint.java#L829-L836

          Anyway, it looks like a newbie-friendly RFE, not a defect. If a pull request is submitted to the core, I will be happy to review it

          Show
          oleg_nenashev Oleg Nenashev added a comment - The method could be promoted to the Run level in directly the core (may also need renaming). LocationChanged() handler for fingerprints could be also generalized then: https://github.com/jenkinsci/jenkins/blob/d4737b2b60438ce0e3cb7a8a6f26675f7c880914/core/src/main/java/hudson/model/Fingerprint.java#L829-L836 Anyway, it looks like a newbie-friendly RFE, not a defect. If a pull request is submitted to the core, I will be happy to review it
          Hide
          matthias_schmalz Matthias Schmalz added a comment -
          Show
          matthias_schmalz Matthias Schmalz added a comment - I've created https://github.com/jenkinsci/jenkins/pull/3476 Hope it is ok.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Released in 2.128

          Show
          oleg_nenashev Oleg Nenashev added a comment - Released in 2.128

            People

            • Assignee:
              Unassigned
              Reporter:
              matthias_schmalz Matthias Schmalz
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: