Skip to content

Azure Kudo / web app post deployment hook that sends deployment notifications to Slack

License

Notifications You must be signed in to change notification settings

NewBoCo/KuduPostDeploymentSlackHook

 
 

Repository files navigation

Kudu Post Deployment Slack Hook

This is a very simple Node.js based Azure web app post deployment hook that notifies deployment status to Slack via an incoming webhook. Azure web app deployment Slack notification

Configuration

  1. Set up an incoming webhook integration in your Slack team.
  2. Configure an environment variable named slackhookuri with the value of the above Slack web hook uri. In Azure you do it via the application settings
  3. Add the uri to your Azure web app Kudu portal web hooks, you reach it via https://{your azure web app}.scm.azurewebsites.net/WebHooks
  4. Optionally you can add an channel query parameter to the hook reuse the Slack hook and override which channel post deployment notifies to i.e. https://{your azure web post deployment app}.azurewebsites.net/?channel=%40devlead

Deployment

You can deploy the web project using the button below Deploy to Azure

Testing

Start webserver

  1. Have Node.js installed, that should be the only dependency
  2. From command line be in the repositories directory and type node server.js (default uri locally is http://localhost:1337/)
  3. From another command line be in the repositories directory and type node test.js
  4. If alls well you should see an message on Slack

Kudu JSON payload example

{
  "id": "2bdc42572263361fef1a3334c562be57dfb06c27",
  "status": "success",
  "statusText": "",
  "authorEmail": "[email protected]",
  "author": "John Doe",
  "message": "Epic new feature!",
  "progress": "",
  "deployer": "",
  "receivedTime": "2015-06-11T09:58:46.9983824Z",
  "startTime": "2015-06-11T10:39:02.1322211Z",
  "endTime": "2015-06-11T10:39:07.555094Z",
  "lastSuccessEndTime": "2015-06-11T10:39:07.555094Z",
  "complete": true,
  "siteName": "azure-dummy-site"
}

About

Azure Kudo / web app post deployment hook that sends deployment notifications to Slack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%