Gerritbot needs to support multiple bots

Bug #1020987 reported by Andrew Hutchings
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Fix Released
Medium
Clark Boylan

Bug Description

Currently gerritbot just supports one bot. We would like:

1. a bot for OpenStack as-is now
2. a bot for Stackforge (see the /root/secret-files/stackforgebot.config for how that should be configured)
3. a bot for Openstack CI stuff in the #openstack-infra channel

This should all be possible with modifications to the gerritbot python script to support multiple bots and a better configuration (YAML?)

Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

of course this could all be one bot that echos certain things in certain channels

Revision history for this message
Monty Taylor (mordred) wrote :

I'm going to go for one bot that's configurable. SO: Change the secret config file to look like this:

[ircbot]
nick=NICKNAME
pass=PASSWORD
server=irc.freenode.net
port=6667

[gerrit]
user=gerrit2
key=/path/to/id_rsa
host=review.example.com
port=29418

And then make a yaml file that can live in the git repo that looks something like this (except for sensible)

openstack-dev:
  - events:
    patchset-created
    change-merged
  - projects:
      openstack/nova
      openstack/swift
  - branches:
      master
      stable/*
openstack-infra:
  - events:
    patchset-created
  - projects:
    openstack/openstack-ci-puppet
    openstack-ci/git-review
    openstack-ci/zuul
 - branches:
    master

As a final bit, I think that the bot should support being hup'd for a config file re-read without restarting.

Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

100% agree

Changed in openstack-ci:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ci-puppet (master)

Reviewed: https://review.openstack.org/9398
Committed: http://github.com/openstack/openstack-ci-puppet/commit/bc2448199a8e883725c60d16fa72ccfb92a02543
Submitter: Jenkins
Branch: master

commit bc2448199a8e883725c60d16fa72ccfb92a02543
Author: Clark Boylan <email address hidden>
Date: Thu Jul 5 11:54:19 2012 -0700

    Allow GerritBot to talk on multiple channels.

    Fixes bug #1020987

    Update GerritBot with the ability to talk on multiple channels. This
    way a single GerritBot instance can operate in multiple channels for
    multiple projects. To make this work this change introduces a new
    channel configuration file (yaml) for GerritBot that specifies each
    channel that GerritBot should join and the changes that channel is
    interested in.

    The config should look something like:
    channel-foo:
        events:
          - patchset-created
          - change-merged
        projects:
          - test/bar
          - test/foo
        branches:
          - master

    Change-Id: I8e278f9be5182611981a3d912cc323bd3d386fc5

Changed in openstack-ci:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.