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

            jglick Jesse Glick created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue depends on JENKINS-30777 [ JENKINS-30777 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-38381 [ JENKINS-38381 ]
            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 .
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue relates to SECURITY-739 [ SECURITY-739 ]
            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 .
            jglick Jesse Glick made changes -
            Component/s workflow-support-plugin [ 21719 ]
            Component/s workflow-job-plugin [ 21716 ]
            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.
            mwinter69 Markus Winter made changes -
            Remote Link This issue links to "Page (Jenkins Wiki)" [ 20408 ]
            mwinter69 Markus Winter made changes -
            Remote Link This issue links to "Page (Jenkins Wiki)" [ 20408 ]
            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.
            jglick Jesse Glick made changes -
            Assignee Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-api PR 76 (Web Link)" [ 21600 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-support PR 72 (Web Link)" [ 21601 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-job PR 105 (Web Link)" [ 21602 ]
            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.
            jglick Jesse Glick made changes -
            Component/s workflow-api-plugin [ 21711 ]
            Component/s workflow-job-plugin [ 21716 ]
            Summary Apply ConsoleLogFilter Ability to decorate Pipeline builds as a global extension
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Issue Type Bug [ 1 ] New Feature [ 2 ]
            Labels api console
            Priority Minor [ 4 ] Major [ 3 ]
            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.
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-48344 [ JENKINS-48344 ]
            Hide
            jglick Jesse Glick added a comment -

            Released in beta.

            Show
            jglick Jesse Glick added a comment - Released in beta.
            jglick Jesse Glick made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            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.
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-57586 [ JENKINS-57586 ]
            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.
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-api #97 (Web Link)" [ 23316 ]

              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: