jfrog / jfrog-azure-devops-extension

Apache License 2.0
47 stars 62 forks source link

X-Ray Scan Task incorrectly produces an error when "Allow fail build" #185

Closed MichaelDenwood closed 4 years ago

MichaelDenwood commented 4 years ago

Describe the bug When the X-ray task is used and the "Allow fail build" option is set to true, the following error is produced: "message": "Xray does not have any Watches monitoring this build, or the Watches monitoring this build do not have a CI Integration action defined.",

To Reproduce In Azure DevOps, create a build. Publish files to antifactory, publish build info, then perform the X-ray scan with the "Allow Build to Fail" checked.

Expected behavior The pipeline should complete successfully if there are no problems found with the uploaded files in X-ray.

Screenshots

[debug]Executing cliCommand: F:\Agents\ProdW3_work_tool\jfrog\1.38.4\x64\jfrog.exe rt bs "FlightOps-CI Desk Commander" "652356" --url="https://artifacts.aa.com/artifactory" --fail=false --user= --password=

Scan result: { "summary": { "total_alerts": 0, "fail_build": true, "message": "Xray does not have any Watches monitoring this build, or the Watches monitoring this build do not have a CI Integration action defined.", "more_details_url": "" }, "alerts": [], "licenses": [] }

image

Versions

Additional context This worked fine until the Extension automatically up-dated.

yahavi commented 4 years ago

@MichaelDenwood, thanks for reporting this issue. We couldn't reproduce this issue. We believe that the root cause does not derived from the extension update, but by a change in the Xray server.

You can simply fix it by adding a watcher for this build in Xray with a fail-build policy. You can use this guide, for example.

More information can be obtained here:

  1. Creating Xray Policies and Rules.
  2. Configuring Xray Watches.
  3. Scanning Published Builds with JFrog Xray.
  4. Why Xray is not scanning my builds?

Please let me know it it helped.

MichaelDenwood commented 4 years ago

I had our Xray Admin change the watches to Fail-build. This resolved the issue. However, this was never needed prior to the update to the ADO Tasks. So, it appears that we can move on from this.