jenkins更新前后通知

1.sh /home/jenkins_scripts/sendmessg.sh 生产 公众号 ${DEPLOY_FILE} 开始发布

2.脚本

sh /home/jenkins_scripts/sendmessg.sh 生产 公众号 ${DEPLOY_FILE} 开始发布

----

#!/bin/sh

userkey='42wobb52-13dd-4shid-b708-75fdsbf3ecf4'
time=`date +%Y%m%d-%H:%M:%S`
curl -i -X POST -H "'Content-type':'application/json'" -d '{ "msgtype": "text", "text": { "content": "'$1'环境 '$2'  
 发布包名:'$3'  
 当前时间:'$time' 
 '$4'", "mentioned_list":["wangqing",""], "mentioned_mobile_list":["",""] } }' https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=$userkey
原文地址:https://www.cnblogs.com/hixiaowei/p/14201305.html