Giter VIP home page Giter VIP logo

instant-messaging-plugin's Introduction

Jenkins Instant-Messaging plugin

Jenkins Plugin GitHub release Jenkins Plugin Installs Build Status GitHub license Maintenance

Introduction

This plugin provides abstract support for instant-messaging notifications to Jenkins, including a common bot-driven command and query interface and the core for pipeline steps integration code.

Practical support for particular IM protocols is implemented by various concrete plugins like the Jabber/XMPP or the IRC plugin, allowing users to have the same interactions with their Jenkins server whatever messenger they use.

Note that there are some other IM protocol plugins that chose to implement everything from scratch, so they do not use instant-messaging-plugin as a dependency and do not enjoy its common features.

There are also plugins which add commands available via instant messaging such as Log Command.

For more information, visit the plugin information page: https://plugins.jenkins.io/instant-messaging/

The practical suggestions for freestyle or pipeline job setup may be seen in https://plugins.jenkins.io/ircbot/ and https://plugins.jenkins.io/jabber/ pages.

Regex support in bot commands

The currentlyBuilding (cb) and queue (q) commands now support an optional argument to apply regular expression filters to the lines they would output, and count and report hits compared to the full job lists.

The key argument for this is ~ and the rest of the argument string is assumed to be the regular expression (note however that whitespace between tokens of the argument string is converted during argument processing; for clarity it would be preferable to pass a single-token argument with \s+ in positions where whitespace matches are expected).

Beside ordinarily matching what is present in a line, this can be used with "negative lookups" for matching lines that do not contain certain patterns. Certain know-how applies to such expressions:

  • To negative-match the whole string from start, use a caret, e.g.:
developer> cb ~ ^(?!master)

to skip jobs running on nodes whose name starts with (or equals) master. Without the caret it did not work.

  • For matching inside a job name, the .* must be also inside the lookahead pattern:
developer> cb ~ ^(?!.*rescan)

would list only jobs whose IM report line does NOT include rescan.

  • Similarly, these commands can be used to quickly gauge how many builds are queued or running (without spelling out each one), with a regex filter or overall:
developer> jenkins: q # ~ mycomponent
jenkins> (notice) Build queue (19 items total, of which 2 items matched the filter)

developer> jenkins: cb #
jenkins> (notice) Currently building (11 items)
  • The currentlyBuilding command can also be asked to provide URLs to the console of the reported running builds, so you can quickly tap into them, e.g.:
developer> jenkins: cb @ ~ UI
jenkins> (notice) - ui-builder-1#0: UIbuild #25190
  @ https://jenkins.some.org/job/UIbuild/25190/console
  (Elapsed time: 2 min 31 sec, Estimated remaining time: 4 min 35 sec)

instant-messaging-plugin's People

Contributors

akomakom avatar alanharder avatar apprme avatar arus2023 avatar basil avatar daniel-beck-bot avatar dependabot[bot] avatar dohbedoh avatar evildmp avatar flowdalic avatar illicitonion avatar jglick avatar jimklimov avatar johnou avatar kbonnette avatar kutzi avatar ndeloof avatar olamy avatar olivergondza avatar petehayes avatar timja avatar williambernardet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.