Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-22279

Crap4j plugin is not constructing URL properly on Jboss

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: crap4j-plugin
    • Labels:
    • Environment:
      JBoss 7.1.1.Final
      Jenkins CI 1.532.2
      Crap4j 0.8
    • Similar Issues:

      Description

      Our instance of Jenkins is deployed to a Jboss server. I noticed that the "build number" URL in the "All Crappy Methods for

      {build#}

      " link is constructed using the Jboss server name, instead of the "Jenkins URL" from the System Configuration.

      For example, if the Jboss server name is set to "localhost" the URL will be set to: http://localhost:8080/jenkins/job/myproject/25/ instead of the proper link using "Jenkins URL" property: http://myjenkins-server/jenkins/job/myproject/25/

        Attachments

          Activity

          Hide
          dlindner dlindner added a comment -

          The problem originates from the erroneous use of getRootUrlFromRequest() instead of getRootUrl() in the CrapBuildResult class (method getTitle).

          As the code is really old, I have to migrate it to the new environment. Please allow a few more days for this fix - its the setup work, not the change itself.

          Show
          dlindner dlindner added a comment - The problem originates from the erroneous use of getRootUrlFromRequest() instead of getRootUrl() in the CrapBuildResult class (method getTitle). As the code is really old, I have to migrate it to the new environment. Please allow a few more days for this fix - its the setup work, not the change itself.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Lindner
          Path:
          src/main/java/hudson/plugins/crap4j/CrapBuildResult.java
          http://jenkins-ci.org/commit/crap4j-plugin/d6431ab28fa474c98443126f66364b5cb3394cb5
          Log:
          Use configured server URL instead of resolved one. Fixes JENKINS-22279

          Compare: https://github.com/jenkinsci/crap4j-plugin/compare/aebf5dfa6cb9...d6431ab28fa4

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Lindner Path: src/main/java/hudson/plugins/crap4j/CrapBuildResult.java http://jenkins-ci.org/commit/crap4j-plugin/d6431ab28fa474c98443126f66364b5cb3394cb5 Log: Use configured server URL instead of resolved one. Fixes JENKINS-22279 Compare: https://github.com/jenkinsci/crap4j-plugin/compare/aebf5dfa6cb9...d6431ab28fa4
          Hide
          dlindner dlindner added a comment -

          Test version with fixed url

          Show
          dlindner dlindner added a comment - Test version with fixed url
          Hide
          dlindner dlindner added a comment -

          I've attached a fixed version of the plugin to this issue. Can you try it out and give feedback? If the problem is solved, I will release a new version.

          Show
          dlindner dlindner added a comment - I've attached a fixed version of the plugin to this issue. Can you try it out and give feedback? If the problem is solved, I will release a new version.
          Hide
          pavelsaab Pavel Saab added a comment -

          I've tested the attached fix and the problem has been solved.

          Thanks.

          Show
          pavelsaab Pavel Saab added a comment - I've tested the attached fix and the problem has been solved. Thanks.
          Hide
          dlindner dlindner added a comment -

          Fix is included in version 0.9

          Show
          dlindner dlindner added a comment - Fix is included in version 0.9

            People

            • Assignee:
              dlindner dlindner
              Reporter:
              pavelsaab Pavel Saab
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: