forked from crosswalk-project/crosswalk
-
Notifications
You must be signed in to change notification settings - Fork 0
Trybot
James Ketrenos edited this page Aug 5, 2013
·
7 revisions
Github Worker is a standalone server to help sync the github repos and trybot server. You can easily trigger, check and rebuild the patches of the github repos by comments in trybot.
Pulling the status of Pulling the status of
pull requests trybot builds
GITHUB <======================== WORKER =====================> TRYBOT
| ------Created/Updated--------> | |
| | ------Auto trigger -------> |
| <---Update the dashboard------ | |
| | --run_trybot_github.sh----> |
| <---Update the dashboard------ | |
| | <---Finished the build----- |
| <----Update the dashboard----- | |
| -Trigger rebuild by reviewers- | |
| | ---run_trybot_github.sh---> |
- WORKER monitors the status of pull requests in GITHUB repos by Github API
- WORKER monitors the status of TRYBOT by the JSON API provided by http://wrt-buildbot.bj.intel.com/buildbot/json/help
- The dashboard in GITHUB repo actually is a comment sent by the WORKER, which can be updated by reviewers and WORKER.
- run_trybot_github.sh is a wrap script to run depot_tools/trychange.py to create the build in trybot.
- Reviewers can select the bots they want to try.
- Reviewers can select the bots to rebuild the patches.
- Install node and MongoDB
- Check out codes from powerbuilder.sh.intel.com:/home/www-data/git-repos/github-worker.git
- Configure the config file
- Start /your/dir/to/mongoDB/bin/mongod by default setting
- cp github-worker/src/run_trybot_github.sh to /your/dir/to/build-infrastructure/
- Start /your/dir/to/mongoDB/bin/mongod if it is not running
- Run run.sh in github-worker/src/
- src/index.js Interface to start the WORKER.
- lib/daemon.js Main implementation of WORKER. Main loop in the file, call github API to fetch the events/status of pull requests; Handle the state machine of pull requests; etc.
- lib/common.js Common settings and load config.
- src/config The config file, see details in the template.
- lib/command.js Interface to run the local command.
- lib/github.js Interface to interact with the trybot.
- lib/dashboard.js Interface to interact with the github comments.
- lib/db.js Connect the mongoDB.