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

provide a simple way to track a pipeline enter a stage

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      for dashboard rendering I need to capture event about pipeline to enter a stage. Pipeline does not offer listeners but RunListener which isn't fine grained enough

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Probably will not do—better covered with existing more general-purpose APIs, or extensions to them.

            Show
            jglick Jesse Glick added a comment - Probably will not do—better covered with existing more general-purpose APIs, or extensions to them.
            Hide
            ndeloof Nicolas De Loof added a comment - - edited

            by "simple way" I would expect I don't have to do such a Promises' voodoo danse, just to catch such a basic event.

            What makes you think it's wrong to create dedicated listener, while a dedicated plugin is created just for "stage" pipeline DSL keyword with 3 classes ?

            Show
            ndeloof Nicolas De Loof added a comment - - edited by "simple way" I would expect I don't have to do such a Promises' voodoo danse , just to catch such a basic event. What makes you think it's wrong to create dedicated listener, while a dedicated plugin is created just for "stage" pipeline DSL keyword with 3 classes ?
            Hide
            jglick Jesse Glick added a comment -

            do such a Promises' voodoo danse

            Indeed it is currently awkward to register a GraphListener for an as-yet-unknown build; the current API is geared towards listening to a build you already have a reference to. That could be a useful general API in workflow-api. Possibly just by documenting that GraphListener may be an @Extension rather than attached, in which case you would receive events from all builds (you can use FlowNode.getExecution as needed).

            At any rate, a specific use case is required for evaluation. Sam Van Oort would probably evaluate.

            As an aside:

            while a dedicated plugin is created just for "stage" pipeline DSL keyword

            The original implementation was rather complex and frequently required patching. The block-scoped step is far simpler and could have been in workflow-basic-steps. I wanted it to be a separate step (label), but Kohsuke Kawaguchi was adamant that the stage name should be reused, so we have a tiny implementation embedded in a more complicated plugin.

            Show
            jglick Jesse Glick added a comment - do such a Promises' voodoo danse Indeed it is currently awkward to register a GraphListener for an as-yet-unknown build; the current API is geared towards listening to a build you already have a reference to. That could be a useful general API in workflow-api . Possibly just by documenting that GraphListener may be an @Extension rather than attached, in which case you would receive events from all builds (you can use FlowNode.getExecution as needed). At any rate, a specific use case is required for evaluation. Sam Van Oort would probably evaluate. As an aside: while a dedicated plugin is created just for "stage" pipeline DSL keyword The original implementation was rather complex and frequently required patching. The block-scoped step is far simpler and could have been in workflow-basic-steps . I wanted it to be a separate step ( label ), but Kohsuke Kawaguchi was adamant that the stage name should be reused, so we have a tiny implementation embedded in a more complicated plugin.
            Hide
            abayer Andrew Bayer added a comment -

            GraphListener in workflow-api is your answer here.

            Show
            abayer Andrew Bayer added a comment - GraphListener in workflow-api is your answer here.

              People

              • Assignee:
                Unassigned
                Reporter:
                ndeloof Nicolas De Loof
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: