DeployBot is a chat bot built on the Hubot framework. It was initially generated by generator-hubot, and configured to be deployed on DCOS to get you up and running as quick as possible.
DeployBot uses a downgraded version of the hubot-slack client 3.4.2 (latest is 4.1.x) due to bug
Go to your Custom Integrations page for your Slack instance and set up a new Bot integration. Copy the API token and save for later.
If running locally, set the following environment variables on your host directly.
HUBOT_SLACK_TOKEN
- Enter your Slack tokenHUBOT_AUTH_ADMIN
- Enter your comma separated list of admin Slack user ids (ex. U12345678)REDIS_URL
- Enter your Redis urlHUBOT_SEMAPHOREAPP_TRIGGER
- Comma-separated list of additional keywords that will trigger status (e.g. "deploy")HUBOT_SEMAPHOREAPP_NOTIFY_RULES
- Comma-separated list of rules (e.g. "room:branch:status")HUBOT_SEMAPHOREAPP_AUTH_TOKEN
- Enter your Semaphore authorization tokenHUBOT_SEMAPHOREAPP_DEPLOY
- Enter something non-zero to enable deployment commandsHUBOT_SEMAPHOREAPP_DEFAULT_PROJECT
- Your default semaphore project or 'proj'HUBOT_SEMAPHOREAPP_DEFAULT_SERVER
- Your default semaphore server or 'prod'
Install brew install redis
and run brew services start redis
Redis server.
Run npm install
if you have just cloned the repo for the first time, to
install the required dependencies.
Run sh run.sh
to start DeployBot.
The bot will now join your Slack instance if you specified the correct API token. You can invite the bot to whatever channel you want it to be present in.
Users must be assigned to the 'deploy' role by and an admin before it is activated.
deploybot <user> has <role> role
- Assigns a role to a userdeploybot <user> doesn't have <role> role
- Removes a role from a userdeploybot list assigned roles
- List all assigned rolesdeploybot what roles do I have
- Find out what roles you havedeploybot what roles does <user> have
- Find out what roles a user hasdeploybot who has <role> role
- Find out who has the given role
deploybot deploy project
- deploys project/master to 'prod'deploybot deploy project to server
- deploys project/master to serverdeploybot deploy project/branch
- deploys project/branch to 'prod'deploybot deploy project/branch to server
- deploys project/branch to server
deploybot rollback project
- rolls back project/master by 1 to 'prod'deploybot rollback project by n_builds
- rolls back project/master by n_builds to 'prod'deploybot rollback project by n_builds to server
- rolls back project/master by n_builds to serverdeploybot rollback project to server
- rolls back project/master by 1 to serverdeploybot rollback project/branch
- rolls back project/branch by 1 to 'prod'deploybot rollback project/branch by n_builds
- rolls back project/branch by n_builds to 'prod'deploybot rollback project/branch by n_builds to server
- rolls back project/branch by n_builds to serverdeploybot rollback project/branch to server
- rolls back project/branch by 1 to server
deploybot semaphoreapp status [<project> [<branch>]]
- Reports build status for projects branchesdeploybot deployed commit
- check if commit has been deployed to default server on default projectdeploybot deployed commit on project
- check if commit has been deployed to default server on projectdeploybot deployed commit on project to server
- check if commit has been deployed to server on projectdeploybot deployed msg
- check if commit message has been deployed to default server on default projectdeploybot deployed msg on project
- check if commit message has been deployed to default server on projectdeploybot deployed msg on project to server
- check if commit message has been deployed to server on project
deploybot brain show storage
- Display the contents that are persisted in the braindeploybot brain show storage --key=[key]
- Display the contents that are persisted with specified key in the braindeploybot brain show users
- Display all users that hubot knows about
deploybot help
- Displays all of the help commands that Hubot knows about.deploybot help <query>
- Displays all help commands that match .