[JIRA] [ircbot-plugin] (JENKINS-34903) IRC plugin: custom post-build message

1 katselukerta
Siirry ensimmäiseen lukemattomaan viestiin

ozizka@java.net (JIRA)

lukematon,
17.5.2016 klo 20.58.0117.5.2016
vastaanottaja jenkinsc...@googlegroups.com
ozizka created an issue
 
Jenkins / Improvement JENKINS-34903
IRC plugin: custom post-build message
Issue Type: Improvement Improvement
Assignee: kutzi
Components: ircbot-plugin
Created: 2016/May/18 12:57 AM
Priority: Minor Minor
Reporter: ozizka

It would be very useful if the message could be customized like:

{{"$

{job.name}

run $

{build.number}

for $

{build.name}

- $

{build.result}

$

{build.result.tests.failed.count.asString}

$

{build.git.pr.url}

"}}

would result in

windup-pr-builder run #1656: for "PR #924: Fixed some mistaked in the ..." - FAILED 6 tests https://github.com/windup/windup/pull/925

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

ozizka@java.net (JIRA)

lukematon,
2.6.2016 klo 10.57.022.6.2016
vastaanottaja jenkinsc...@googlegroups.com
ozizka updated an issue
Change By: ozizka
It would be very useful if the message could be customized like:

{ code}
{ { "${job.name} run ${build.number} for ${build.name} - ${build.result} ${build.result.tests.failed.count.asString} ${build.git.pr.url}"}}
{code}
would result in

{quote}windup-pr-builder run #1656: for "PR #924: Fixed some mistaked in the ..." - FAILED 6 tests https://github.com/windup/windup/pull/925{quote}

ozizka@java.net (JIRA)

lukematon,
2.6.2016 klo 10.58.012.6.2016
vastaanottaja jenkinsc...@googlegroups.com

ozizka@java.net (JIRA)

lukematon,
2.6.2016 klo 11.03.012.6.2016
vastaanottaja jenkinsc...@googlegroups.com

ozizka@java.net (JIRA)

lukematon,
2.6.2016 klo 11.08.012.6.2016
vastaanottaja jenkinsc...@googlegroups.com
ozizka commented on Improvement JENKINS-34903

It seems this was fixed in 2011 by https://github.com/jenkinsci/instant-messaging-plugin/commit/8241564a92d342259ae4c95b1467b45998fb0188
but for some reason, we are still getting
(15:58:08) windup-jenkins: Yippee, build fixed!
(15:58:08) windup-jenkins: Project windup-pr-builder build #1707: FIXED in 33 min: http://wonka.mw.lab.eng.bos.redhat.com/jenkins/job/windup-pr-builder/1707/

jimklimov@gmail.com (JIRA)

lukematon,
14.8.2019 klo 7.15.0314.8.2019
vastaanottaja jenkinsc...@googlegroups.com

I don't think there is currently a way to disable that line, but it could be an option (literally, adding a configuration knob). PRs welcome

According to `git grep` in the current instant-messaging-plugin master sources, there are two "Yippee" lines:

  • `src/main/resources/hudson/plugins/im/build_notify/Messages.properties`: `SummaryOnlyBuildToChatNotifier.BuildIsFixed=Yippee, build fixed!\n` – this is a text resource leading to its usage in src/main/java/hudson/plugins/im/build_notify/SummaryOnlyBuildToChatNotifier.java
  • a verbatim line in src/main/java/hudson/plugins/im/build_notify/BuildToChatNotifier.java apparently for a message to developer who contributed to fixing a job's state since the last (failed) run

In any case, there are several sides to the original problem (custom format strings effectively) and to Yippee's : there can be a text resource change that is relatively easy to convey at run-time through configurable instant-messaging-plugin options (global or in the job, and maybe have to be exposed in protocol plugins like ircbot), and a logical change (passing needed Java values instead of the placeholders configured in the format string, enabling or disabling Yippee's optionally) that has to be coded, compiled and distributed.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jimklimov@gmail.com (JIRA)

lukematon,
14.8.2019 klo 7.16.0214.8.2019
vastaanottaja jenkinsc...@googlegroups.com
Jim Klimov updated an issue
 
Change By: Jim Klimov
Component/s: instant-messaging-plugin

jimklimov@gmail.com (JIRA)

lukematon,
14.8.2019 klo 7.23.0214.8.2019
vastaanottaja jenkinsc...@googlegroups.com
 
Re: IRC plugin: custom post-build message

In this month's release of the two plugins, there are a couple of features that can help:

  • adding an "extra message" that should work in the legacy and pipeline invocations, which is a string you can provide and will be attached to the standard build starting/completed notifications. Your job could generate it somehow (easier in a scripted pipeline). Not sure if it supports groovy variable expansion like many other plugins do, but I'd assume that is relatively easy to research and implement if needed. This might be flexible enough for passing the extra data.
  • more for the pipeline context, calling `ircNotify customMessage:"Some text"` should just post that message verbatim (which again you can create in the pipeline) at that point in execution
Vastaa kaikille
Vastaa kirjoittajalle
Välitä
0 uutta viestiä