Skip to content

oleg-nenashev/ircbot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JIRA/GitHub management IRCBot

Build Status

This IRC bot sits on #jenkins as jenkins-admin and allow users to create/fork repositories on GitHub, etc. More info: IRC Bot Wiki

Deployment

This repo is containerized, then deployed to our infrastructure via Puppet. You should have a Write permission to https://github.com/jenkins-infra/ircbot and https://github.com/jenkins-infra/jenkins-infra to deploy the new version of the Bot

Actions:

  1. Commit/merge changes into the master branch
  2. Wait till the preparation of Docker package on Jenkins INFRA
  1. Modify the version on Puppet infrastructure
  1. Wait till the deployment
  • See first steps of the deployment process on https://jenkins.ci.cloudbees.com/job/infra/job/jenkins-infra
  • The further deployment will be performed asynchronously (puppet checks for changes once per 15 minutes)
    • jenkins-admin will leave and join the chat
    • infra-butler will mention in #jenkins-infra that Spinach was updated

License

MIT License

Developer guide

This section contains some info for developers.

Reusing IRCBot in non-Jenkins project

The bot is designed to be used in Jenkins, but it can be adjusted in other projects, which use the similar infrastructure (GitHub, IRC, JIRA). Adjustements can be made via System properties. These properties are located and documented in the org.jenkinsci.backend.ircbot.IrcBotConfig class.

Several examples are provided below.

Building the bot

  1. Use Maven to build the project and to run the unit tests.
  2. Then use Dockerfile to create a Docker image

For detailed examples see Jenkinsfile located in this repository.

Testing the bot locally

Preconditions:

  1. You have a JIRA Test Project, where you have admin permissions.
  2. You have a GitHub Organization with Administer permissions

Setting up the environment:

  1. Setup Github credentials in the ~/.github file
  • Format: Java properties
  • Entries to set: login and password
  • It's also possible oauth and endpoint properties (see github-api)
  1. Setup JIRA credentials in the ~/.jenkins-ci.org file
  • Format: Java properties
  • Entries to set: userName and password

Running the bot for testing:

java -Dircbot.name=test-ircbot \ 
-Dircbot.channels="#jenkins-ircbot-test" \ 
-Dircbot.testSuperUser="${YOUR_IRC_NAME}" \ 
-Dircbot.github.organization="jenkinsci-infra-ircbot-test" \
-Dircbot.jira.url=${JIRA_URL} \
-Dircbot.jira.defaultProject=TEST \
-jar target/ircbot-2.0-SNAPSHOT-bin/ircbot-2.0-SNAPSHOT.jar 

After executing this command the bot should connect to your IRC chat.

About

Jenkins IRCbot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages

  • Java 98.3%
  • Makefile 1.7%