Commit 05fb2b74 authored by 智勇's avatar 智勇

dingTalkPush 增加是否pipeline判断

parent 2bbe4b13
...@@ -144,7 +144,11 @@ const dingTalkPush = async function (ctx) { ...@@ -144,7 +144,11 @@ const dingTalkPush = async function (ctx) {
buildNumber, flag, image, domain, tier, buildNumber, flag, image, domain, tier,
} = ctx.request.body } = ctx.request.body
const result = await PipeLinePush.getOnePipePush(buildNumber) const result = await PipeLinePush.getOnePipePush(buildNumber)
console.log('getOnePipePush', result) console.log('getOnePipePush', result, ctx.request.body)
if (result.length === 0) {
logger.info(`${buildNumber} 不是pipeline触发,不发送dingtalk`)
ctx.body = ctx.ok(`${buildNumber} 不是pipeline触发,不发送dingtalk`)
}
const pipeLineData = await PipeLine.getOnePipe(result[0].projectName) const pipeLineData = await PipeLine.getOnePipe(result[0].projectName)
for (let i = 0; i < pipeLineData.length; i += 1) { for (let i = 0; i < pipeLineData.length; i += 1) {
const res = pipeLineData[i].repos const res = pipeLineData[i].repos
......
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