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
6f82194f
Commit
6f82194f
authored
Dec 11, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
邮件详情
parent
cf7774bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
sonar.js
app/controller/sonar.js
+7
-5
app.config.js
src/app.config.js
+1
-0
No files found.
app/controller/sonar.js
View file @
6f82194f
...
@@ -20,7 +20,8 @@ const sendFailMail = async (data, item, executionTimeMs) => {
...
@@ -20,7 +20,8 @@ const sendFailMail = async (data, item, executionTimeMs) => {
+
`扫描时间 :
${
duration
}
s<br/>`
+
`扫描时间 :
${
duration
}
s<br/>`
+
`分析时间 :
${
executionTime
}
s<br/>`
+
`分析时间 :
${
executionTime
}
s<br/>`
+
`扫描日期 :
${
item
.
analysisDate
}
<br/>`
+
`扫描日期 :
${
item
.
analysisDate
}
<br/>`
+
`查看详情 :
${
config
.
sonarHost
}
/project/activity?id=
${
data
.
projectName
}
&&selected_date=
${
item
.
analysisDate
}
`
+
`查看详情 :
${
config
.
qahomeHost
}
/pipeline/sonarJob?gitUser=
${
data
.
gitUser
}
`
// + `查看详情 : ${config.sonarHost}/project/activity?id=${data.projectName}&&selected_date=${item.analysisDate}`
sendMail
(
address
,
`
${
data
.
projectName
}
${
title
}
`
,
text
)
sendMail
(
address
,
`
${
data
.
projectName
}
${
title
}
`
,
text
)
}
}
...
@@ -30,8 +31,9 @@ const sendExceptionMail = async (data) => {
...
@@ -30,8 +31,9 @@ const sendExceptionMail = async (data) => {
+
`<font color=#000000> 结果信息 :
${
data
.
error
}
<br/>`
+
`<font color=#000000> 结果信息 :
${
data
.
error
}
<br/>`
+
`项目名称 :
${
data
.
projectName
}
<br/>`
+
`项目名称 :
${
data
.
projectName
}
<br/>`
+
`分支名称 :
${
data
.
branchName
}
<br/>`
+
`分支名称 :
${
data
.
branchName
}
<br/>`
+
`Sonar详情 :
${
config
.
sonarHost
}
/dashboard?id=
${
data
.
projectName
}
<br/>`
+
`查看详情 :
${
config
.
qahomeHost
}
/pipeline/sonarJob?gitUser=
${
data
.
gitUser
}
`
+
`Jenskins详情 :
${
data
.
absoluteUrl
}
console <br/>`
// + `Sonar详情 : ${config.sonarHost}/dashboard?id=${data.projectName} <br/>`
// + `Jenskins详情 : ${data.absoluteUrl}console <br/>`
sendMail
(
address
,
`
${
data
.
projectName
}
${
title
}
`
,
text
)
sendMail
(
address
,
`
${
data
.
projectName
}
${
title
}
`
,
text
)
}
}
...
@@ -43,7 +45,7 @@ const sendExistMail = async (data, gitUser) => {
...
@@ -43,7 +45,7 @@ const sendExistMail = async (data, gitUser) => {
+
`分支名称 :
${
data
.
branchName
}
<br/>`
+
`分支名称 :
${
data
.
branchName
}
<br/>`
+
`GITHASH :
${
data
.
branchHash
}
<br/>`
+
`GITHASH :
${
data
.
branchHash
}
<br/>`
+
`扫描分析日期 :
${
data
.
analysisDate
}
<br/>`
+
`扫描分析日期 :
${
data
.
analysisDate
}
<br/>`
+
`查看详情 :
${
config
.
sonarHost
}
/project/activity?id=
${
data
.
projectName
}
&&selected_date=
${
data
.
analysisDate
}
`
+
`查看详情 :
${
config
.
qahomeHost
}
/pipeline/sonarJob?gitUser=
${
data
.
gitUser
}
`
sendMail
(
address
,
`
${
data
.
projectName
}
${
title
}
`
,
text
)
sendMail
(
address
,
`
${
data
.
projectName
}
${
title
}
`
,
text
)
}
}
...
@@ -87,7 +89,7 @@ const callback = async (ctx) => {
...
@@ -87,7 +89,7 @@ const callback = async (ctx) => {
url
:
`
${
data
.
content
.
ceTaskUrl
}
`
,
url
:
`
${
data
.
content
.
ceTaskUrl
}
`
,
method
:
'
GET
'
,
method
:
'
GET
'
,
})
})
logger
.
info
(
data
.
projectName
,
data
.
branchName
,
data
.
branchHash
,
'
的分析任务执行信息:
'
,
ceTaskResult
.
task
.
status
,
ceTaskResult
)
logger
.
info
(
data
.
projectName
,
data
.
branchName
,
data
.
branchHash
,
'
的分析任务执行信息:
'
,
ceTaskResult
.
task
.
status
)
if
(
ceTaskResult
.
task
.
status
===
'
SUCCESS
'
)
{
if
(
ceTaskResult
.
task
.
status
===
'
SUCCESS
'
)
{
flag
=
false
flag
=
false
...
...
src/app.config.js
View file @
6f82194f
...
@@ -57,5 +57,6 @@ module.exports = {
...
@@ -57,5 +57,6 @@ module.exports = {
dingdingMemory
:
'
https://oapi.dingtalk.com/robot/send?access_token
'
dingdingMemory
:
'
https://oapi.dingtalk.com/robot/send?access_token
'
+
'
=7cab1f948d67c3565a30323c58773c0ba77c7bd1a3eb1c11f8b2d1b6b4a395df
'
,
+
'
=7cab1f948d67c3565a30323c58773c0ba77c7bd1a3eb1c11f8b2d1b6b4a395df
'
,
sonarHost
:
'
http://sonar.quantgroups.com
'
,
sonarHost
:
'
http://sonar.quantgroups.com
'
,
qahomeHost
:
'
http://qa2.liangkebang.com
'
,
snorDingRobotAddr
:
'
https://oapi.dingtalk.com/robot/send?access_token=0da7a1066b42bb23f079dacec3b7975e8cc12cee7efc5316a9b5b1900779a407
'
,
snorDingRobotAddr
:
'
https://oapi.dingtalk.com/robot/send?access_token=0da7a1066b42bb23f079dacec3b7975e8cc12cee7efc5316a9b5b1900779a407
'
,
}
}
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