jfrog / teamcity-artifactory-plugin

TeamCity plugin that enables traceable build artifacts with Artifactory
https://www.jfrog.com/confluence/display/JFROG/TeamCity+Artifactory+Plug-in
Apache License 2.0
42 stars 47 forks source link

Build-info link doesn’t work. Plugin creates invalid url. #119

Closed lezuch closed 1 year ago

lezuch commented 2 years ago

We're using Artifactory 7.41.7 Artifactory Plugin (2.9.4) creates an invalid URL. After clicking on "Artifactory Build Info" I have a blank page. Creates link https:///artifactory/webapp/builds/Test3/3 Instead https:///ui/builds/Test3/3

I assume the problem is here

        StringBuilder artifactoryUrlBuilder = new StringBuilder().append(selectedServerUrl);
        if (!selectedServerUrl.endsWith("/")) {
            artifactoryUrlBuilder.append("/");
        }
        String artifactoryUrl = artifactoryUrlBuilder
                .append("webapp/builds/")

With Artifatory 6, the "Artifactory Build Info" links work fine.

yahavi commented 1 year ago

@lezuch, Thanks for reporting this issue! TeamCity Artifactory plugin 1.9.5 is released. This version includes the fix for this issue. Feel free to upgrade - we'd appreciate your feedback on that.

Nheverest commented 1 year ago

Hello, A quick comment to say the solution requires the /artifactory context to be present in Artifactory's URL. Which does not seem mandatory based on Artifactory as Root Application in Tomcat.