jfrog / jfrog-azure-devops-extension

Apache License 2.0
47 stars 61 forks source link

"Xray Build Scan Report" link is broken #234

Closed joeyfrog closed 2 years ago

joeyfrog commented 3 years ago

Describe the bug When configuring the extension with an on-prem Artifactory 7.x instance, the generated link in "Xray Build Scan Report" points to /artifactory/ui/builds/ which is an invalid path. It appears that this issue does not occur with Artifactory Cloud instances.

To Reproduce

  1. Configure Azure DevOps with an on-prem Artifactory instance (tested on 7.9.2) which is connected on an on-prem Xray instance (tested on 3.18.2).
  2. Create a build pipeline which deploys a build to Artifactory and triggers an Xray scan. I have used this pipeline.
  3. When the build concludes, click the "Xray Build Scan Report" and observe the 401/404 error.

Expected behavior The link should point to the valid path, which is /ui/builds/

Workaround A temporary solution is using a specific rewrite rule in the reverse proxy. For example, when using NGINX in front of Artifactory, locate the following rule:

        location ~ ^/artifactory/ {
            proxy_pass    http://127.0.0.1:8081;
        }

And add this rule above it:

        location ~ ^/artifactory/ui/(.*) {
            return 301 /ui/$1;
        }

This will redirect requests from /artifactory/ui/builds/ to /ui/builds/ while maintaining the build path.

Versions

RobiNino commented 2 years ago

Hi @joeyfrog, The link was fixed at points to the "Xray Data" tab on the platform. Thanks for reporting this issue.