我有一个在http://******:82/codedx
这些是构建的日志:
2017-11-13T22:17:14.6911243Z ==============================================================================
2017-11-13T22:17:14.6911243Z Task : Code Dx - Upload Files
2017-11-13T22:17:14.6911243Z Description : Upload files to Code Dx
2017-11-13T22:17:14.6911243Z Version : 0.1.18
2017-11-13T22:17:14.6911243Z Author : CodeDx
2017-11-13T22:17:14.6911243Z Help :
2017-11-13T22:17:14.6911243Z ==============================================================================
2017-11-13T22:17:14.7536277Z Preparing task execution handler.
2017-11-13T22:17:15.8474356Z Executing the powershell script: C:\agent\_work\_tasks\CodeDxUploadFilse_7a5fadd7-438e-4e37-bba4-aac9d265893c\0.1.18\UploadSourceToCodeDx.ps1
2017-11-13T22:17:15.8630563Z Code Dx URL: http://*******:82/codedx
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z Project ID: 1
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z API key: **********
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z Paths: C:\agent\_work\4\s\***\****\Controllers\AccountController.cs
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z Source/binaries filenames:
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z Full URL: http://********:82/codedx/api/projects/1/analysis
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z Processing C:\agent\_work\4\s\****\****\Controllers\AccountController.cs as file1...
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z Reading contents of AccountController.cs...
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z Content size: 45983 bytes
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z Building HTTP content...
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z Building request message...
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z Sending source to Code Dx...
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8630563Z
2017-11-13T22:17:15.8942973Z Reading response...
2017-11-13T22:17:15.8942973Z
2017-11-13T22:17:15.8942973Z
2017-11-13T22:17:15.8942973Z Response: {"error":"No appropriate role for file AccountController.cs - it should be removed"}
2017-11-13T22:17:15.8942973Z
2017-11-13T22:17:15.8942973Z
2017-11-13T22:17:15.9411717Z ##[section]Finishing: Code Dx
如何指定将项目下的所有文件扫描到CodeDx?
答案 0 :(得分:2)
您可以使用zip文件上传源代码。我在构建定义中添加了两个额外的任务:1将源文件存档到zip文件中,1将zip文件上传到Code Dx:
归档任务的Archive file to create
参数将成为您的Code Dx任务中的Files to upload
参数。
存档任务
代码Dx任务
答案 1 :(得分:1)
Code Dx接受以下格式的应用程序输入(Built-in Code Scanners):
您上传不受支持的cs文件,您可以在zip文件中包含源文件(例如.cs)并上传zip文件。