I started working on this feature, and it requires 2 PRs (im and jabber plugins). I'll open them once the code is ready to merge.
[changes for Instant Messaging |https://github.com/jenkinsci/instant-messaging-plugin/compare/master...akomakom:pipeline-support?expand=1] [changes for Jabber|https://github.com/jenkinsci/jabber-plugin/compare/master...akomakom:pipeline-support?expand=1]
Direct links to branches if you want to build this manually:
It's a work in progress [https://github . com/akomakom/instant-messaging-plugin/tree/pipeline-support]
[https://github.com/akomakom/jabber-plugin/tree/pipeline-support]
I am introducing a *jabberNotify* step: {code:java} //pipeline: jabberNotify targets: '*test'
//normal options can be set: jabberNotify notificationStrategy: 'failure', notifyCulprits: true, notifyFixers: true, notifySuspects: true, notifyUpstreamCommitters: true, targets: '*test'
//plus some extras: jabberNotify extraMessage: 'I am the tester!', targets: '*test'{code} In "test" Jabber chatroom (Result is *NOT BUILT* because the job hasn't finished and result hasn't been set): {noformat} [17:49:03] <Jenkins> Project test-pipeline-syntax build #70: NOT BUILT in 0.22 sec: http://xxxxxx I am the tester!!!{noformat} I'm basically aiming to make a pipeline step that causes a "notify now" type action, disregarding concepts like "notify on start/end" that would only be possible in a FreestyleJob, but honoring things like "only culprits", "strategy", etc. So the step code will probably wind up in either catch or finally blocks in real life most of the time (but it can be used multiple times in a build).
Without a doubt I'm not doing everything the best way, but I'll try to build on this over time. Comments and PR's (to my branches, I guess) are welcome.
*Syntax generator screenshot:*
!Screenshot_2017-12-02_06-40-27.png|thumbnail! |
|
|