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

Ability to decorate Pipeline builds as a global extension

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      See JENKINS-30777. Does not currently work from WorkflowRun.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Any patch now would be likely to conflict in a minor way with JENKINS-38381.

            Show
            jglick Jesse Glick added a comment - Any patch now would be likely to conflict in a minor way with JENKINS-38381 .
            Hide
            jglick Jesse Glick added a comment -

            Actually ought to be done in LogActionImpl.stream; and then under JENKINS-38381 in AnnotatedLogAction.DecoratedTaskListener. The latter could only support filters which are also Serializable (the same restriction as already exists for ConsoleLogFilter objects applied contextually), so to avoid behavioral changes this restriction should also be enforced in LogActionImpl. That means plugins registering such an extension, in order to be compatible with Pipeline, would need to ensure that it implements Serializable as well as overriding the new overload taking Run.

            Show
            jglick Jesse Glick added a comment - Actually ought to be done in LogActionImpl.stream ; and then under JENKINS-38381 in  AnnotatedLogAction.DecoratedTaskListener . The latter could only support filters which are also Serializable (the same restriction as already exists for ConsoleLogFilter objects applied contextually ), so to avoid behavioral changes this restriction should also be enforced in LogActionImpl . That means plugins registering such an extension, in order to be compatible with Pipeline, would need to ensure that it implements Serializable as well as overriding the new overload taking Run .
            Hide
            jglick Jesse Glick added a comment -

            (Pipeline code could however print a warning to the log file when encountering a filter which fails to be serializable and/or override the correct overload.)

            Show
            jglick Jesse Glick added a comment - (Pipeline code could however print a warning to the log file when encountering a filter which fails to be serializable and/or override the correct overload.)
            Hide
            mwinter69 Markus Winter added a comment - - edited

            The drawback of doing it in LogActionImpl.stream is that this will not capture the complete output. What is missing is the started and finished messages from the listener and the intermediate output with the prefix. While the prefixed output is probably not that important, having the started by and the finished message when for example using the logstash plugin I would consider important. Not sure if JENKINS-38381 would solve that.

            Show
            mwinter69 Markus Winter added a comment - - edited The drawback of doing it in LogActionImpl.stream is that this will not capture the complete output. What is missing is the started and finished messages from the listener and the intermediate output with the prefix. While the prefixed output is probably not that important, having the started by and the finished message when for example using the logstash plugin I would consider important. Not sure if JENKINS-38381 would solve that.
            Hide
            jglick Jesse Glick added a comment -

            It would.

            Show
            jglick Jesse Glick added a comment - It would.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Markus Winter
            Path:
            pom.xml
            src/main/java/com/michelin/cio/hudson/plugins/maskpasswords/MaskPasswordsConsoleLogFilter.java
            http://jenkins-ci.org/commit/mask-passwords-plugin/ba1c3781e91c18c6c57d96c3022eec9f66b48f8f
            Log:
            use modern api in ConsoleLogFilter

            When enabled globally it should work with all types of Jobs, also
            pipelines once JENKINS-45693 is fixed.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Markus Winter Path: pom.xml src/main/java/com/michelin/cio/hudson/plugins/maskpasswords/MaskPasswordsConsoleLogFilter.java http://jenkins-ci.org/commit/mask-passwords-plugin/ba1c3781e91c18c6c57d96c3022eec9f66b48f8f Log: use modern api in ConsoleLogFilter When enabled globally it should work with all types of Jobs, also pipelines once JENKINS-45693 is fixed.
            Hide
            jglick Jesse Glick added a comment -

            ConsoleLogFilter itself did not work out; filed PRs introducing a better API.

            Show
            jglick Jesse Glick added a comment - ConsoleLogFilter itself did not work out; filed PRs introducing a better API.
            Hide
            jglick Jesse Glick added a comment -

            when for example using the logstash plugin

            …though this is an invalid use case. JEP-210 has direct support for external log storage. There is work underway on a Logstash implementation, not based on the existing plugin.

            Show
            jglick Jesse Glick added a comment - when for example using the logstash plugin …though this is an invalid use case. JEP-210 has direct support for external log storage. There is work underway on a Logstash implementation, not based on the existing plugin.
            Hide
            jglick Jesse Glick added a comment -

            Released in beta.

            Show
            jglick Jesse Glick added a comment - Released in beta.
            Hide
            abubadabu Timm Drevensek added a comment - - edited

            Hey Jesse Glick, any chance you can release this feature?

            Show
            abubadabu Timm Drevensek added a comment - - edited Hey Jesse Glick , any chance you can release this feature?
            Hide
            jglick Jesse Glick added a comment -

            It already is. You do need to

            <useBeta>true</useBeta>
            

            to acknowledge that you are consuming an experimental API.

            Show
            jglick Jesse Glick added a comment - It already is. You do need to <useBeta> true </useBeta> to acknowledge that you are consuming an experimental API.
            Hide
            rschaeferhig Richard Schaefer added a comment -

            Jesse Glick - where would I specify the useBeta tag to enable this? 

            Show
            rschaeferhig Richard Schaefer added a comment - Jesse Glick - where would I specify the useBeta tag to enable this? 
            Hide
            jglick Jesse Glick added a comment -

            Richard Schaefer inside <properties> in the POM. Note however that workflow-api #97, if merged & released, would avoid the need for this.

            Show
            jglick Jesse Glick added a comment - Richard Schaefer inside <properties> in the POM. Note however that workflow-api #97, if merged & released, would avoid the need for this.

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              jglick Jesse Glick
              Votes:
              8 Vote for this issue
              Watchers:
              19 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: