Commit 9295f7a9 authored by 智勇's avatar 智勇

增加日志

parent aa528eff
...@@ -22,7 +22,7 @@ const awaitRequest = function (options) { ...@@ -22,7 +22,7 @@ const awaitRequest = function (options) {
}) })
} }
const webhooks = async function (ctx) { const webhooks = async function (ctx) {
console.log('webhooks', ctx.request.body) logger.info('webhooks', ctx.request.body)
// 增删分支之类的push // 增删分支之类的push
if (ctx.request.body.commits.length === 0) { if (ctx.request.body.commits.length === 0) {
...@@ -143,6 +143,7 @@ const sendData = async (namespace, projectName, branchName, gitUser, flag, messa ...@@ -143,6 +143,7 @@ const sendData = async (namespace, projectName, branchName, gitUser, flag, messa
}, },
body: JSON.stringify(dingData), body: JSON.stringify(dingData),
}) })
logger.info(`发送dingtalk ${JSON.stringify(dingData)}`)
} }
} }
...@@ -182,6 +183,7 @@ const dingTalkPush = async function (ctx) { ...@@ -182,6 +183,7 @@ const dingTalkPush = async function (ctx) {
}, },
body: JSON.stringify(params), body: JSON.stringify(params),
}) })
logger.info(`部署服务 ${JSON.stringify(params)}`)
} }
sendData(dingTalkData.namespace, result[0].projectName, result[0].branchName, result[0].gitUser, sendData(dingTalkData.namespace, result[0].projectName, result[0].branchName, result[0].gitUser,
flag, result[0].commitMes, res[j].type, buildNumber, dingTalkData.noticeAddress) flag, result[0].commitMes, res[j].type, buildNumber, dingTalkData.noticeAddress)
......
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