dploy icon indicating copy to clipboard operation
dploy copied to clipboard

Feature request: Callback after deployment

Open siamkreative opened this issue 9 years ago • 7 comments

Hey there,

dploy has already become one of my favorite tool. Greatest finding for 2014!

An awesome addition would be to have the opportunity to setup a callback. The idea behind this is to be able to send notification to Slack / HipChat after successful deployment.

At this time, our clients using Slack can see when we commit stuff (Bitbucket post hooks) and it would be great if they could see when we push things live.

Lemme know what you think :)

Cheers

siamkreative avatar Oct 01 '14 04:10 siamkreative

I +1 this. Would be great to have a post-deployment callback. This would open the door to so many integrations.

julien731 avatar Oct 01 '14 05:10 julien731

Great idea. I'd love to be able to send notifications to Slack.

gesen avatar Oct 28 '14 20:10 gesen

+1.

martenbjork avatar Oct 28 '14 22:10 martenbjork

That's definitely a good idea. At the moment you can achieve this by using the API instead of the CLI:

var DPLOY = require("dploy");

var settings = {
  host: 'ftp.example.com',
  user: 'user',
  pass: 'password',
  path: {
    remote: 'public_html/',
    local: ''
  }
}

new DPLOY(settings, function() {
  // the upload is now completed
  // so you can send notifications to slack
});

But I am working on a new version of DPLOY at the moment, so I'm up for suggestions of how this could work? Maybe a post_upload parameter on your config file that requests a JavaScript file:

post_upload: notify_slack.js

Anyway, I'm up for discussions so we can implement this on next versions.

lucasmotta avatar Oct 30 '14 11:10 lucasmotta

That would totally work for me @lucasmotta :)

When do you plan on releasing the new version? In the meantime, how to use the API? I haven't been able to find documentation about it.

siamkreative avatar Oct 31 '14 04:10 siamkreative

@SiamKreative I hope soon, but I haven't had the time recently to finish it.

And the API is something I did quickly in order to create the https://github.com/LeanMeanFightingMachine/grunt-dploy, but it will be better detailed on the next release.

lucasmotta avatar Nov 03 '14 17:11 lucasmotta

Shame on me I never noticed this repo @lucasmotta !

I was able to create a similar thing workflow using grunt-exec (or grunt-shell I can't remember). This is much better.

siamkreative avatar Nov 05 '14 02:11 siamkreative