0.0.3 • Published 9 years ago

hubot-uhura v0.0.3

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
9 years ago

hubot-uhura

A hubot script that talks to riker. It allows admins to assign deployment permissions to particular roles, and users to perform the deployment.

Installation

In hubot project repo, run:

npm install hubot-uhura --save

Then add hubot-uhura to your external-scripts.json:

[
  "hubot-uhura"
]

Configuration

The script supports the following environment variables:

  • HUBOT_UHURA_RIKER_URL - URL pointing to an instance of Riker
  • HUBOT_UHURA_RIKER_TOKEN - Riker authorization token

Authorization

This script depends on hubot-auth (or anything that provides compatible API) for role management.

This script assumes the presence of the robot.auth object containing the following functions:

  • robot.auth.hasRole(user, role) - returns true if user has a role, false otherwise
  • robot.auth.userRoles(user) - returns an array of roles assigned to given user

Only people in the admin group can assign deployment permissions.

Commands

This scripts provides the following commands:

  • hubot role <role> can deploy <project> - Give deploy permissions to a role. Only available to users who have the admin role.

  • hubot role <role> can't deploy <project> - Remove deploy permissions from a role. Only available to users who have the admin role.

  • hubot deploy <project> to <env> [version <version>] - Deploy a project to given <env>, optionally specifying a <version> to deploy. The user issuing this command needs to have a role that is allowed to deploy the particular project for the command to succeed. If <version> is skipped, the default value configured in Riker will be used.

Sample Interaction

user1>> hubot role wizard can deploy thing
hubot>> @user1 wizard can now deploy thing
user1>> hubot deploy thing to dev
hubot>> @user1 Deploying thing to dev

NPM Module

https://www.npmjs.com/package/hubot-uhura

Uhura?

Lieutenant Nyota Uhura, chief communication officer aboard the fictional USS Enterprise starship. As a communication officer she is the appropriate person to pass the captain's (your!) orders to commander Riker.

Uhura

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago