Allow Pipeline builds to use the same default templates as Freestyle

XMLWordPrintable

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor
    • Component/s: hipchat-plugin
    • None

      With classic Freestyle, I'm able to simply identify theĀ "Notification Type" (build successful, build is unstable, etc. – there are 7 of them)Ā but leave the message template blank, andĀ the notifications sent are usefully structured HipChat cards, with a message (such as "MyJob #1234 Build successful after 5 sec (View build)") and a bottom section that shows counts ofĀ the successful tests, failed tests, skipped tests, and a link to the test report.

      However, in Pipeline, with the hipchatSend command, explicit message templates must beĀ provided (the "message" parameter is required, and an error is raised if it's not provided). Moreover, it does not appear that there's a simple way to structureĀ the message as a card, like the default Freestyle notifications.

      Is it feasible to have a Pipeline build do something like:

      hipchatSend notificationType: "build successful"

      And have that result in the same thing an equivalent Freestyle notification would? I get that Pipeline builds don't syntactically have the same notion of "post-build" events, butĀ it seems like something that would hook into the default templates through some new parameter (like notificationType) could be called in the appropriate points in a Pipeline (at the beginning, if tests fail, etc.), and could also lay groundwork forĀ using this in a Declarative Pipeline (which would simply configure the notification scenarios desired, equivalent to how a Freestyle build does).

            Assignee:
            Unassigned
            Reporter:
            Nick Jones
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: