This IRC bot sits on #jenkins
as jenkins-admin
and allow users to create/fork repositories on GitHub, etc. More info: IRC Bot Wiki
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:
- Commit/merge changes into the master branch
- Wait till the preparation of Docker package on Jenkins INFRA
- Go to the IRC Bot job on https://ci.jenkins-ci.org
- Wait till the automatic build finishes with a SUCCESS status
- Modify the version on Puppet infrastructure
- Edit your local fork the following file: https://github.com/jenkins-infra/jenkins-infra/blob/staging/hieradata/common.yaml#L94
- Change the
profile::jenkinsadmin::image_tag
variable.- Format:
build${JENKINSCI_BUILD_NUMBER}
- Format:
- Create a pull request to the main repo. Branch=staging
- Wait till the merge of the pull request. Write to #jenkins-infra channel to request the review
- 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
This section contains some info for developers.
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.
- Use Maven to build the project and to run the unit tests.
- Then use Dockerfile to create a Docker image
For detailed examples see Jenkinsfile located in this repository.
Preconditions:
- You have a JIRA Test Project, where you have admin permissions.
- You have a GitHub Organization with
Administer
permissions
Setting up the environment:
- Setup Github credentials in the
~/.github
file
- Format: Java properties
- Entries to set:
login
andpassword
- It's also possible
oauth
andendpoint
properties (see github-api)
- Setup JIRA credentials in the
~/.jenkins-ci.org
file
- Format: Java properties
- Entries to set:
userName
andpassword
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.