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

dynamically join IRC channels defined in jobs

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • ircbot-plugin
    • IRC plugin 2.21
      Jenkins LTS 1.480.3

      Whenever a job specify an IRC channel that is not defined in the global configuration, the IRC bot is not able to send to that channel.

      Given a job like:

      <publishers>
      <hudson.plugins.ircbot.IrcPublisher>
      <targets>
      <hudson.plugins.im.GroupChatIMMessageTarget>
      <name>#wikimedia-test</name>
      <notificationOnly>false</notificationOnly>
      </hudson.plugins.im.GroupChatIMMessageTarget>
      </targets>
      <strategy>ALL</strategy>
      <notifyOnBuildStart>true</notifyOnBuildStart>
      <notifySuspects>false</notifySuspects>
      <notifyCulprits>false</notifyCulprits>
      <notifyFixers>false</notifyFixers>
      <notifyUpstreamCommitters>false</notifyUpstreamCommitters>
      <buildToChatNotifier class="hudson.plugins.im.build_notify.DefaultBuildToChatNotifier"/>
      <matrixMultiplier>ONLY_CONFIGURATIONS</matrixMultiplier>
      <channels/>
      </hudson.plugins.ircbot.IrcPublisher>
      </publishers>

      The resulting FINEST log for 'hudson.plugins.ircbot' gives out:

      Mar 27, 2013 12:09:14 PM hudson.plugins.ircbot.v2.PircListener onServerResponse
      WARNING: IRC server responded error 404 Message:
      mw-jenkinsbot #wikimedia-test :Cannot send to channel
      Mar 27, 2013 12:09:14 PM hudson.plugins.ircbot.v2.PircListener onServerResponse
      WARNING: IRC server responded error 404 Message:
      mw-jenkinsbot #wikimedia-test :Cannot send to channel

      There are several ways to solve this issue. Either:

      • in job configuration, only list the globally configured channels. Maybe using a list to pick from.
      • dynamically register channels on job save and make the bot join. Could be made an optional feature.

      Also, with the default login level, the plugin does not warn that it has not been able to send the notification. The console shows:

      Started by user hashar
      Building on master in workspace /var/lib/jenkins/jobs/Test - IRC notification/workspace
      IRC notifier plugin: Sending notification to: #wikimedia-test
      Finished: SUCCESS

      Which is a bit misleading.

            kutzi kutzi
            hashar Antoine Musso
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: