Firstly you need to create webhook url in slack. How to do it you can find at https://www.programmableweb.com/news/how-to-integrate-webhooks-slack-api/how-to/2015/10/20
Secondly you need for example a bash script. My version you can find in gist:
Firstly you need to create webhook url in slack. How to do it you can find at https://www.programmableweb.com/news/how-to-integrate-webhooks-slack-api/how-to/2015/10/20
Secondly you need for example a bash script. My version you can find in gist: