Ansibullbot is compatible with both Python 2.7 and Python 3.7.
Usage of unicode strings is required.
- Fork this repo
- Clone your fork
- Create a feature branch
- Optionally: create a Python virtual environment
- Install the python requirements:
pip install -r requirements.txt
- Create the log file:
- either add
--log path/to/file.log
to thetriage_ansible.py
below - or use
sudo touch /var/log/ansibullbot.log && sudo chmod 777 /var/log/ansibullbot.log
- either add
- Create the config file, copy
examples/ansibullbot.cfg
to one of these paths:~/.ansibullbot.cfg
$CWD/ansibullot.cfg
/etc/ansibullot/ansibullbot.cfg
- define
ANSIBULLBOT_CONFIG
environment variable where the configuration file is located
- fill in the credentials
Run with verbose
, debug
and dry-run
...
./triage_ansible.py --debug --verbose --dry-run
- Download
BOTMETA.yml
to a local directory - Edit the file with whatever changes you want to make.
- Run
triage_ansible.py
with--botmetafile=<PATHTOFILE>
.
If you have a specific issue to test against, use the --id
parameter to speed up testing.
The --id
parameter can take a path to a script. The scripts
directory is full of scripts that will return json'ified lists of issue numbers. One example is the scripts/list_open_issues_with_needs_info.sh
script which scrapes the github UI for any issues with the needs_info label. Here's how you might use that to test your changes to ansibullbot against all issues with needs_info ...
./triage_ansible.py --debug --verbose --dry-run --id=scripts/list_open_issues_with_needs_info.sh
Ansibullbot is deployed and managed using Ansible and Ansible Tower. There are several roles used by Ansibullbot, each of which is a git submodule.
When making changes anything besides the roles, make the changes to this repository and submit a pull request.
When making changes to roles, first submit pull request to the role repository and ensure it is merged to the pull request repository. Then, submit a pull request to this repository updating the submodule to the include the new commit.
To update the role submodule and include it in your pull request:
- Run
git submodule update --remote [path to role]
to pull in the latest role commits. git add [path to role]
- Commit and push the branch to your fork
- Submit the pull request