forked from BleRui/CodeccCheckAtom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask.json
More file actions
420 lines (420 loc) · 9.48 KB
/
task.json
File metadata and controls
420 lines (420 loc) · 9.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
{
"atomCode": "CodeccCheckAtom",
"execution": {
"language": "java",
"minimumVersion": "1.8",
"deFmands": [],
"target": "java -jar code-check-atom.jar"
},
"input": {
"languages": {
"rule": {},
"type": "atom-checkbox-list",
"required": true,
"label": "工程语言",
"list": [],
"default": [],
"desc": "不同代码语言,可选择相匹配的工具",
"tabName": "basic"
},
"tools": {
"rule": {},
"required": true,
"hidden": true,
"type": "atom-checkbox-list",
"label": "代码检查工具",
"list": [],
"default": [],
"tabName": "basic"
},
"asyncTask": {
"rule": {},
"type": "enum-input",
"label": "执行方式",
"list": [
{
"value": false,
"label": "同步"
},
{
"value": true,
"label": "异步"
}
],
"default": false,
"desc": "",
"tabName": "main",
"inline": true
},
"asyncTaskId": {
"rule": {
"asyncTaskRequired": true
},
"type": "task-select",
"label": "任务",
"required": true,
"tabName": "async",
"inline": true,
"list": {},
"default": 0,
"rely": {}
},
"goPath": {
"rule": {},
"type": "vuex-input",
"label": "GOPATH",
"default": "",
"required": false,
"desc": "可帮助工具查找依赖库代码路径,更好地扫描告警",
"placeholder": "${WORKSPACE}下相对路径,多路径请用英文逗号分割,支持使用流水线变量",
"tabName": "basic",
"inline": true,
"rely": {
"operation": "AND",
"expression": [
{
"key": "tools",
"value": "GOML"
}
]
}
},
"pyVersion": {
"rule": {},
"type": "enum-input",
"label": "Python版本",
"required": true,
"list": [
{
"label": "Python2",
"value": "py2"
},
{
"label": "Python3",
"value": "py3"
}
],
"default": "py3",
"tabName": "basic",
"inline": true,
"rely": {
"operation": "AND",
"expression": [
{
"key": "tools",
"value": "PYLINT"
}
]
}
},
"scriptType": {
"rule": {},
"type": "enum-input",
"label": "脚本类型",
"required": true,
"hidden": false,
"list": [
{
"id": "sh",
"value": "SHELL",
"label": "Shell"
}
],
"default": "SHELL",
"tabName": "basic",
"lang": "sh",
"inline": true
},
"script": {
"rule": {
"scriptRequired": true
},
"label": "脚本内容",
"hidden": false,
"default": "# Coverity/Klocwork将通过调用编译脚本来编译您的代码,以追踪深层次的缺陷\n# 请使用依赖的构建工具如maven/cmake等写一个编译脚本build.sh\n# 确保build.sh能够编译代码\n# cd path/to/build.sh\n# sh build.sh",
"required": true,
"type": "atom-ace-editor",
"desc": "相应工具将使用该脚本编译代码,以便追踪编译过程,发现代码缺陷",
"tabName": "basic"
},
"languageRuleSetMap": {
"hidden": true,
"default": {}
},
"C_CPP_RULE": {
"rule": {
"ruleSetRequired": true
},
"type": "rule-set-select",
"label": "C/C++",
"required": true,
"tabName": "basic",
"inline": true,
"list": {},
"default": [],
"rely": {
"operation": "AND",
"expression": [
{
"key": "languages",
"value": "C_CPP"
}
]
}
},
"rtxReceiverType": {
"type": "selector",
"label": "接收人",
"default": "0",
"options": [
{
"id": "0",
"name": "所有人员"
},
{
"id": "1",
"name": "仅管理员"
},
{
"id": "2",
"name": "自定义"
},
{
"id": "3",
"name": "无(不发送)"
}
],
"inline": true
},
"rtxReceiverList": {
"type": "company-staff-input",
"label": "自定义接收人",
"default": [],
"rely": {
"operation": "AND",
"expression": [
{
"key": "rtxReceiverType",
"value": "2"
}
]
},
"inline": true
},
"botWebhookUrl": {
"label": "Webhook地址",
"placeholder": "代码检查完成后推送Coverity、Klocwork遗留告警数至群中",
"type": "vuex-input",
"default": "",
"inline": true
},
"botContent": {
"label": "通知内容"
},
"botRemindRange": {
"type": "enum-input",
"default": "1",
"label": "告警",
"list": [
{
"value": "1",
"label": "新增"
},
{
"value": "2",
"label": "遗留"
}
],
"innerTab": true,
"inline": true
},
"botRemindSeverity": {
"type": "selector",
"default": "7",
"options": [
{
"id": "7",
"name": "总告警数"
},
{
"id": "3",
"name": "严重 + 一般告警数"
},
{
"id": "1",
"name": "严重告警数"
}
],
"innerTab": true,
"inline": true
},
"botRemaindTools": {
"type": "selector",
"default": [],
"label": "工具",
"innerTab": true,
"inline": true,
"optionsConf": {
"multiple": true
}
},
"emailReceiverType": {
"type": "selector",
"label": "接收人",
"default": "0",
"options": [
{
"id": "0",
"name": "所有人员"
},
{
"id": "1",
"name": "仅管理员"
},
{
"id": "2",
"name": "自定义"
},
{
"id": "3",
"name": "无(不发送)"
}
],
"inline": true
},
"emailReceiverList": {
"type": "company-staff-input",
"label": "自定义接收人",
"default": [],
"rely": {
"operation": "AND",
"expression": [
{
"key": "emailReceiverType",
"value": "2"
}
]
},
"inline": true
},
"emailCCReceiverList": {
"type": "company-staff-input",
"label": "抄送人",
"default": [],
"inline": true,
"inputType": "all"
},
"instantReportStatus": {
"label": "即时报告",
"default": "2",
"type": "enum-input",
"inline": true,
"list": [
{
"value": "1",
"label": "启用"
},
{
"value": "2",
"label": "停用"
}
]
},
"timerEmail": {
"label": "定时报告"
},
"reportDate": {
"default": [],
"label": "每周",
"type": "week-selector",
"innerTab": true,
"inline": true
},
"reportTime": {
"default": "",
"label": "时间",
"innerTab": true,
"inline": true
},
"reportTools": {
"type": "selector",
"default": [],
"label": "工具",
"innerTab": true,
"inline": true,
"optionsConf": {
"multiple": true
}
},
"toolScanType": {
"rule": {},
"type": "radio-group",
"label": "扫描方式",
"required": true,
"list": [
{
"label": "增量扫描(推荐)",
"value": "1"
},
{
"label": "MR/PR扫描",
"value": "2"
},
{
"label": "全量扫描",
"value": "0"
}
],
"default": "1",
"descLink": "xxxxx",
"descLinkText": "了解更多",
"desc": "增量扫描:扫描本次构建与上次构建的差异代码。首次为全量扫描。\nMR/PR扫描:扫描MR/PR的源分支与目标分支的差异代码。源分支代码需拉取到工作空间。\n全量扫描:扫描全部代码。Klocwork、Pinpoint、Gometalinter、重复率仅支持该扫描方式。"
},
"mrCommentEnable": {
"label": "",
"default": true,
"type": "atom-checkbox",
"text": "将扫描出的问题同步到工蜂代码查看页面"
},
"newDefectJudgeFromDate": {
"default": "",
"label": "新告警判定",
"desc": "所选日期之后产生的告警为新告警"
},
"transferAuthorList": {
"default": [],
"type": "author-transfer",
"label": "处理人转换",
"desc": "各工具原处理人的告警都将自动转给新处理人"
},
"path": {
"default": [],
"type": "item-edit"
},
"customPath": {
"default": [],
"type": "item-edit"
},
"openScanPrj": {
"label": "",
"default": false,
"placeholder": "",
"type": "atom-checkbox",
"text": "是否是开源扫描项目",
"desc": "选中则走开源扫描流程",
"required": false,
"disabled": false,
"hidden": true
}
},
"output": {
"BK_CI_CODECC_TASK_ID": {
"type": "string",
"description": "CodeCC的任务id"
},
"BK_CI_CODECC_TASK_STATUS": {
"type": "string",
"description": "CodeCC任务是否运行成功,成功则未true,不然取不到"
}
}
}