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

Would be nice to have a "console" output area for template testing

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I can "get by" inside the Jenkins JVM, but I am no guru.

      So I am in the middle of my Groovy Template and need to log a few lines of output into the job's console output.

      I have the build variable and it seems to me that from there I should be able to find the console . . . but I have yet to figure that out (if it is possible at all).

      The logger you passed me seems to be TaskLister.NULL, so that isn't useful.

      Your ExtendedEmailPublisherContext contains a pointer to the Listener . . . but there is no way to get to that instance that I can see, though if I am wrong, please enlighten me.

      It doesn't have to be pretty . . . I am willing to jump from object to object to find the damn thing, I just have yet to figure out a path to it.

      I have thought of going back up to the project and searching out the EmailExt plugin from there, but I doubt that will be helpful because it won't be a "build specific" copy. Though perhaps having found that, there is a way to jump to the build specific copy . . . if so please.

      If there is a way . . . please enlighten me.

      Frank

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          Are you trying to get logs during template testing? I could possibly add a console, but there currently isn't any rendering. When you run an actual build, the listener object should work just fine.

          Show
          slide_o_mix Alex Earl added a comment - Are you trying to get logs during template testing? I could possibly add a console, but there currently isn't any rendering. When you run an actual build, the listener object should work just fine.
          Hide
          fmerrow Frank Merrow added a comment -

          !!! You are right . . . listener works just fine in a build . . .

          I've been working “around” the fact I didn't have a logger in the Template for months now . . .

          When I started this project last December . . . I was a real Jenkins newb . . . how telling how I came to this conclusion . . .

          THANK YOU for pointing up the obvious.

          Frank

          Show
          fmerrow Frank Merrow added a comment - !!! You are right . . . listener works just fine in a build . . . I've been working “around” the fact I didn't have a logger in the Template for months now . . . When I started this project last December . . . I was a real Jenkins newb . . . how telling how I came to this conclusion . . . THANK YOU for pointing up the obvious. Frank
          Hide
          slide_o_mix Alex Earl added a comment -

          I think it would be good to have a console on the template testing page though, just for debug purposes. So, I'm going to retitle this issue and keep it open.

          Show
          slide_o_mix Alex Earl added a comment - I think it would be good to have a console on the template testing page though, just for debug purposes. So, I'm going to retitle this issue and keep it open.
          Hide
          slide_o_mix Alex Earl added a comment -

          Changing title to reflect a desire to have a "console" for debug messages when testing templates.

          Show
          slide_o_mix Alex Earl added a comment - Changing title to reflect a desire to have a "console" for debug messages when testing templates.
          Hide
          slide_o_mix Alex Earl added a comment -

          Fixed in c137a9. Should be part of 2.39.

          Show
          slide_o_mix Alex Earl added a comment - Fixed in c137a9. Should be part of 2.39.

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              fmerrow Frank Merrow
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: