Neutrinos Peludos Magnéticos
Wondering what’s next for npm?Check out our public roadmap! »

flowdock-deploy-notify

0.1.6 • Public • Published

Send Flowdock notification on successful deployment

Simple utility for sending a notification to Flowdock on a successful deployment. This project uses the Flowdock push API.

Install

npm install flowdock-deploy-notify

Example usage

Passing options via command line

flowdock-deploy-notify \\
  --flowToken=df89s7af89ds0a7daa \\
  --fromEmail=deploy@lucify.com 
  --url=http://dev.foo.com/bar 
  --verbose

Passing options via configuration object

Create file flowdock-deploy-notify.config.js

module.exports = {
  flowToken: 'df89s7af89ds0a7das',
  fromEmail: 'deploy@lucify.com',
  url: 'http://dev.foo.com/bar'
}

Then simply run

flowdock-deploy-notify --verbose

The tool looks by default for a configuration object from ./flowdock-deploy-notify.config.js. You can also specify an alternative path for the configuration object with the --config option.

Using via Javascript API

var flowdockDeployNotify = require('flowdock-deploy-notify');
deployNotify({
  flowToken: 'df89s7af89ds0a7das',
  fromEmail: 'deploy@lucify.com',
  url: 'http://dev.foo.com/bar'
}, function(err) {
    if (err) {
      console.log('Failed to send notification to Flowdock');
    } else {
      console.log('Notification delivered to Flowdock');
    }
});

Options

Required

  • flowToken: Flowdock token for the flow to which we wish to send the notification
  • fromEmail: From email address required by Flowdock.

Optional

  • url: URL to which the project was deployed, to be included in the message.
  • project: Name of the project, to be included in the message. Defaults to one determined by project-name.
  • branch: Branch name to include in the message. Defaults to one determined by git-rev-sync if there is a git repository.
  • env: Name of target environment to include in message. Defaults to production.
  • source: Source name required by Flowdock. Defaults to preview.

Only available via command line

  • config: Alternative path for configuration object.
  • verbose: Enable verbose output for command line.

Test

Make sure you have the right node version

nvm use

As the tests are sending actual notifications to the Flowdock API, you will need have a FLOW_TOKEN environment variable defined for tests to work.

FLOW_TOKEN=your_test_flow_token npm test

Keywords

Install

npm i flowdock-deploy-notify

DownloadsWeekly Downloads

1

Version

0.1.6

License

MIT

Last publish

Collaborators

  • avatar