Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-api
Commits
9295f7a9
Commit
9295f7a9
authored
Oct 29, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加日志
parent
aa528eff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
pipeline.js
app/controller/pipeline.js
+3
-1
No files found.
app/controller/pipeline.js
View file @
9295f7a9
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment