Commit 3f6b119b by 王悦

add ding

parent b274c848
......@@ -6,10 +6,14 @@ module.exports = {
'179.6': "qualitydoctor|zhichan/qualitydoctor-deployment.yaml",
'7.0': "ipopweb|zhichan/ipop-web-deployment.yaml",
'1.0': "igirl|zhichan/igirl-web-deployment.yaml",
'31.0': "zc-channel-gateway|zhichan/igirl-channel-gateway.yaml",
'1230.0': "marketplat|zhichan/newtime/marketplat-deployment.yaml",
'1240.0': "mmc|zhichan/newtime/mmc-deployment.yaml",
'1270.0': "jiaxiya|zhichan/newtime/zhiquanquan-deployment.yaml",
'80.1': "center-channel|zhichan/center-channel-deployment.yaml",
'80.2': "center-channel|zhichan/center-channel-deployment.yaml",
'90.0': "center-app|zhichan/center-app-deployment.yaml",
'81.1': "center-order|zhichan/center-order-deployment.yaml",
'98.0': "center-tmtransaction|zhichan/center-tmtransaction-deployment.yaml",
"120.0": "monitor|jobs/monitor.yml",
"0.42": "frontpub|zhichan/front-deployment.yaml",
......
......@@ -37,13 +37,23 @@ app.post("/upline", async function (req, res, next) {
let { stdout, stderr } = await exec(patternstr)
console.log('stdout:', stdout);
console.error('stderr:', stderr);
pushDing(`发布成功:${containerName}-${version}`)
} catch (e) {
console.log(e)
pushDing(`发布失败:${version}`)
res.end("ok")
}
}
res.end("ok")
})
async function pushDing(content){
let t = new Date().toLocaleString()
let url = "https://oapi.dingtalk.com/robot/send?access_token=2160717973e87b0e77b23db1e656e0af01f79fd031ad9fc0adcd90c2b0d2c623"
let curlStr = `curl -k -H 'Content-type: application/json' -d '{ "msgtype": "text","text": {"content": "${t+content}"}}' ${url}`
let { stdout, stderr } = await exec(curlStr)
console.log('stdout:', stdout);
console.error('stderr:', stderr);
}
server.listen(31199, function () {
console.log('Express server listening .....');
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment