jenkinsci/dependency-track-plugin

Dtrack-API with contextpath not accessible

Zohhak opened this issue · 0 comments

Describe the bug

When the Dependency-Track-API is deployed behind a proxy with an added contextpath, the current master version of the depdency-track-plugin is unable to access it. Its already not working when testing the connection on the "configure jenkins"-site.
Examples:
configured Dependency-Track Backend URL: https://xyz.com/dtrack-api
expected generated test url: https://xyz.com/dtrack-api/api/v1/project
current wrong generated url: https://xyz.com/api/v1/project

with that a 404 is returned and the plugin is not usable anymore.

Environment

  • Plugin Version: master 5.0.0-SNAPSHOT
  • Jenkins Version: 2.387.3
  • Java Version for Jenkins: 11
  • Type of Jenkins Job: declarative pipeline (but should not matter)
  • Dependency-Track Version: 4.8.0

To Reproduce

Steps to reproduce the behavior:

  1. Setup dtrack-api with context-path
  2. configure plugin with url
  3. test connection
  4. See error

Expected behavior

dependency-track-plugin honours context-path when building urls