Send Flowdock notification on successful deployment
npm install flowdock-deploy-notifySimple utility for sending a notification to Flowdock on a successful deployment. This project uses the Flowdock push API.
``shell`
npm install flowdock-deploy-notify
`shell`
flowdock-deploy-notify \\
--flowToken=df89s7af89ds0a7daa \\
--fromEmail=deploy@lucify.com
--url=http://dev.foo.com/bar
--verbose
Create file flowdock-deploy-notify.config.js`js`
module.exports = {
flowToken: 'df89s7af89ds0a7das',
fromEmail: 'deploy@lucify.com',
url: 'http://dev.foo.com/bar'
}
Then simply run
`shell`
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.
`js`
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');
}
});
- flowToken: Flowdock token for the flow to which we wish to send the notificationfromEmail
- : From email address required by Flowdock.
- 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.
- config: Alternative path for configuration object.verbose
- : Enable verbose output for command line.
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