-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop Travis entirely since it's not doing anything useful.
- Loading branch information
Showing
5 changed files
with
24 additions
and
578 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,105 +12,44 @@ This is Gratipay's version of GitHub's Campfire bot, hubot. He's pretty cool. | |
|
||
To test roobot locally: | ||
|
||
``` | ||
git clone [email protected]:gratipay/roobot.git && cd roobot | ||
npm install | ||
bin/hubot -n roobot | ||
``` | ||
git clone [email protected]:gratipay/roobot.git && cd roobot | ||
npm install | ||
bin/hubot -n roobot | ||
|
||
## Contributing | ||
|
||
See [CONTRIBUTING.md](CONTRIBUTING.md). | ||
roobot is composed of a core ([hubot][]) and a set of scripts. The configuration is | ||
done through environment variables. | ||
|
||
## Deploying | ||
|
||
Defore deploying changes, you'll need to do the following: | ||
|
||
* install [**Grunt CLI**](http://gruntjs.com/): `[sudo] npm install --global grunt-cli` | ||
* install Heroku Toolbelt CLI | ||
* install [Heroku pipeline plugin](https://devcenter.heroku.com/articles/labs-pipelines): | ||
`heroku plugins:install git://github.com/heroku/heroku-pipeline.git` | ||
|
||
``` | ||
git clone [email protected]:gratipay/roobot.git | ||
git checkout master | ||
grunt release[:patch | :minor | :major] | ||
# Here's what will happen: | ||
# 1. Grunt will push to origin remote (GitHub). | ||
# 2. Travis will run tests. | ||
# 3. On success, Travis will push to `roobot-test` Heroku app. | ||
# Confirm the bot is working in #gratipay-test | ||
# Confirm logs look fine | ||
heroku --app=roobot-test logs | ||
# Promote the build from test to prod (ie. #gratipay) | ||
heroku --app=roobot-test pipeline:promote | ||
heroku --app=roobot-prod ps:restart web # If previous dyno still has nickname | ||
heroku --app=roobot-prod logs | ||
``` | ||
|
||
### Sensitive Deploys | ||
|
||
Sometimes, when pushing sensitive releases, you don't want a public | ||
record of the release to exist prior to successfully deploying live on | ||
Heroku. For example, we don't want a fixed critical bug commit public on | ||
GitHub, and this dangerous situation would be exacerbated if the | ||
subsequent Heroku deploy failed. | ||
Scripts come for three sources: | ||
|
||
To push directly to Heroku first: | ||
- the `hubot-scripts.json` file, it adds scripts from the official [hubot-scripts][] repository | ||
- the `external-scripts.json` file, it adds scripts from standalone repositories (e.g. [hubot-seen][]) | ||
- the `scripts` directories, it contains our own custom scripts | ||
|
||
``` | ||
git remote add heroku [email protected]:roobot-test.git | ||
git config branch.master.remote heroku | ||
grunt release[:patch | :minor | :major] | ||
git config branch.master.remote origin | ||
# Confirm the bot is working in #gratipay-test... | ||
# Carry through above steps from normal deploy | ||
# Push to GitHub once changes are live on prod | ||
git push origin master --tags | ||
``` | ||
![Hubot deploy pipeline](https://rawgithub.com/gratipay/roobot/master/docs/hubot-deploy-workflow.svg) | ||
|
||
### Scripting | ||
|
||
Take a look at the scripts in the `./scripts` folder for examples. | ||
Delete any scripts you think are useless or boring. Add whatever functionality you | ||
want hubot to have. Read up on what you can do with hubot in the [Scripting Guide](https://github.com/github/hubot/blob/master/docs/scripting.md). | ||
|
||
## hubot-scripts | ||
|
||
There will inevitably be functionality that everyone will want. Instead | ||
of adding it to hubot itself, you can submit pull requests to | ||
[hubot-scripts][hubot-scripts]. | ||
|
||
To enable scripts from the hubot-scripts package, add the script name with | ||
extension as a double quoted string to the `hubot-scripts.json` file in this | ||
repo. | ||
Take a look at the [Scripting Guide][] if you want to write a new script. | ||
|
||
[hubot]: https://github.com/github/hubot | ||
[hubot-scripts]: https://github.com/github/hubot-scripts | ||
[hubot-seen]: https://github.com/gratipay/hubot-seen | ||
[Scripting Guide]: https://github.com/github/hubot/blob/master/docs/scripting.md | ||
|
||
## external-scripts | ||
## Deploying | ||
|
||
Tired of waiting for your script to be merged into `hubot-scripts`? Want to | ||
maintain the repository and package yourself? Then this added functionality | ||
maybe for you! | ||
git remote add heroku [email protected]:roobot-test.git | ||
git remote add heroku-prod [email protected]:roobot-prod.git | ||
|
||
Hubot is now able to load scripts from third-party `npm` packages! To enable | ||
this functionality you can follow the following steps. | ||
# Deploy to the test channel | ||
git push heroku | ||
|
||
1. Add the packages as dependencies into your `package.json` | ||
2. `npm install` to make sure those packages are installed | ||
# Confirm the bot is working in #gratipay-test | ||
# Take a look at the logs if there is a problem: | ||
# heroku -a roobot-test logs -t | ||
|
||
To enable third-party scripts that you've added you will need to add the package | ||
name as a double quoted string to the `external-scripts.json` file in this repo. | ||
# If all is well deploy to the prod channel (i.e. #gratipay) | ||
git push heroku-prod | ||
|
||
## Restart the bot | ||
## Restarting the bot | ||
|
||
You may want to get comfortable with `heroku logs` and `heroku restart` | ||
if you're having issues. | ||
|
Oops, something went wrong.