- Homepage
- Issues
- Documentation
- [Email](mailto:don at elskwid.net)
Mina plugin to add Flowdock deployment notifications.
mina-flowdock
pushes deployment notifications to Flowdock team inboxes using
the Flowdock API.
Add multiple Flowdock API tokens to send notifications to multiple flows.
Notifications are tagged with #deploy
and the stage (deploy env). More
tags can be added. See (Settings).
The Mina git module supports deployment using a specific commit or branch. The option used is detected and included in the notifications.
The bare checkout on the server is used to find the sha for the commit/branch being deployed which is then returned in the notification. An error is raised if it can't be retrieved.
The notifications are not sent if mina is run with the --simulate
option.
The Ruby/Git
library is used to access the git config for the local repository
and send the notification from the user configured there.
Most of the settings are easily overridden. See (Settings).
There are some differences between the Mina notifications and those sent from flowdock/capistrano because of the assumptions made by each deployment library.
The capistrano notifications will list deployed commits when possible. Cap
has access to a full git checkout and with that the currently deployed branch.
Mina uses a bare repository and so the branch or commit for the current
deploy is not known. mina-flowdock
just sends a simple notification that a
branch or commit has been deployed to a specific stage.
# In your deploy tasks...
require 'mina/flowdock'
# required settings
set :flowdock_project_name, "my_project"
set :flowdock_api_token, ["firstflowapitoken", "secondflowapitoken"]
set :flowdock_deploy_env, stage
# optional settings
set :flowdock_deploy_tags, ["my_tag1", "my_tag2"]
Then run mina deploy ...
as usual. Requiring mina/flowdock
extends the
file with some helper methods, includes the Flowdock notification task
(flowdock:notify
), and uses mina-hooks
to queue the notifications to
run after the deployment.
The flowdock:notify
task will exit with an error if any of the required
settings are missing.
The name of the project being deployed. Used in the subject of the notfications.
Default: not set
List of one or more api tokens for the flows that should receive notifications. Used to authorize inbox notifications.
Default: not set
Deployment environment for this deploy. (i.e. production, staging, qa). Used in the default notification message.
Default: not set
These settings aren't required to be set in your deployment scripts or may be otherwise configurable.
List of tags used to tag the team inbox notification. Always includes both
the deploy
and deploy env name as tags.
Default: ["deploy", flowdock_deploy_env]
Source for Flowdock notifications.
Default: "Mina deployment"
Name of the person sending the notifications. Used as the user link in notifications.
Default: "user.name" retrieved from git config for the local repository.
Email of the person sending the notifications. Used as the user link in notificiations.
Default: "user.email" retrieved from git config for the local repository.
ERB string used as the notification subject.
Default: "<%= flowdock_project_name %> deployed to #<%= flowdock_deploy_env %>"
Example: MyProject deployed to staging.
ERB string used as the notification body.
Default: "<%= flowdock_deploy_type %> <%= flowdock_deploy_ref %> (<%= flowdock_deploy_sha %>) was deployed to <%= flowdock_deploy_env %>."
Example: Branch feature-branch (git-sha) was deployed to staging.
These can't be overridden. Well, not easily overridden.
One of "Branch" or "Commit" depending on the option passed to mina.
Either the branch name or the commit sha passed ot mina.
The git sha retrieved from the server after deployment. Uses the
flowdock_deploy_ref
to get the sha and return it for use in notifications.
$ gem install mina-flowdock
Copyright (c) 2013 Don Morrison
See {file:LICENSE.txt} for details.