I have a CodeDx sever running at http://******:82/codedx
This is how my build task looks in VSTS.
And these are the logs for the build: 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
How do I specify to scan all my files under a project to CodeDx?
You can upload your source code using a zip file. I added two additional tasks to my build definition: 1 to archive the source files into a zip file and 1 to upload the zip file to Code Dx:
The Archive file to create
parameter of your archive task becomes the Files to upload
parameter in your Code Dx task.
Archive task
Code Dx task
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments