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

Build Failure Analyzer persist Incorrect master field details in Statistics collections

XMLWordPrintable

      Hello

       

      Currently we are using the Statistics details from mongodb to do post action of failed build. But we are having an issue that the master attribute not have the correct host info . So this issue blocking us to generate the actual build URL . I have describe the problem below in details 

      We have hosted lots of Jenkins masters as below

      http://myServer:8080/jenkins1

      http://myServer:8080/jenkins2

      http://myServer:8080/jenkins3

      http://myServer:8080/jenkins4

      http://myServer:8080/jenkins5

       

      Storage type - Mongo DB and Statistics is enabled Administrative settings . So that when there is failure from any of the Jenkins master details are persist . but when the Statistics info are saved only the initial part of Jenkins master url are saved

       eg:

      myServer:8080

       

       its looks like getting as below removing the suffix part of our Jenkins master url

       

       

      String masterString = Jenkins.getInstance().getRootUrl();

      //masterString is corret Jenkins master url (http://myServer:8080/jenkins)

       

      name = new URL(masterString).getHost();

      //only considered the host info as myServer:8080

       

      From <https://github.com/jenkinsci/build-failure-analyzer-plugin/blob/master/src/main/java/com/sonyericsson/jenkins/plugins/bfa/utils/BfaUtils.java>

       

      Could you please save the rootUrl as it or introduce a new field for buildURL .

       

      Thank in advance

            t_westling Tomas Westling
            lokanath Lokanath Behera
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: