jfrog-cli
jfrog-cli copied to clipboard
Invalid return url from build scan since 2.60.0
Describe the bug
We have noticed that since updating to the latest 2.61.2 release, the xray_data_url
value being returned from running jf build-scan
is no longer a valid URL as it does not contain the Xray host name.
It would appear to be related to the changes from https://github.com/jfrog/jfrog-cli-security/pull/106 that were added in 2.60.0
I am wondering if it is related to the fact that we supply the --server-id
argument to the jf build-scan
command?
Current behavior
Receive results similar to the following (note the incomplete URL):
...
[Debug] JFrog Xray version is: 3.69.3
[🔵Info] Waiting for Build Scan to complete...
[Debug] Sending HTTP GET request to: https://artifactory.somecompany.com/xray/api/v2/ci/build/some-build/1.2.3
[Debug] The resulted url from API is https://au.artifactory.somecompany.com/, and the CLI config url is
[🔵Info] The scan data is available at: ui/builds/some-build/1.2.3/1722401114525/xrayData?buildRepo=artifactory-build-info
DEBUG: [
{
"xray_data_url": "ui/builds/some-build/1.2.3/1722401114525/xrayData?buildRepo=artifactory-build-info"
}
]
...
Reproduction steps
For an Artifactory/Xray instance with a different API Base URL compared to the CLI:
- Add a server configuration using
jf config add 'SERVER-ID' ...
- Run a build scan using
jf build-scan --server-id 'SERVER-ID' ...
Expected behavior
Given the example in the current behaviour, we'd expect to see the following as the returned URL:
{
"xray_data_url": "https://artifactory.somecompany.com/ui/builds/some-build/1.2.3/1722401114525/xrayData?buildRepo=artifactory-build-info"
}
JFrog CLI version
2.60.0
Operating system type and version
Linux
JFrog Artifactory version
No response
JFrog Xray version
No response