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

Plugin doesn't support jenkins URL prefix (--prefix option)

    XMLWordPrintable

Details

    Description

      My jenkins is running behind an apache server, my configuration is very simple and look like this one : https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache

      The plugin doesn't work with this configuration because absolute URL are used into the javascript code, for example in html5-notification.js there is a

      ...new Ajax.Request('/html5-notifier-plugin/list')...

      that refer in my case to http://<HOST>/html5-notifier-plugin/list, but the real list is at http://<HOST>/jenkins/html5-notifier-plugin/list

      It might be a Jenkins way to get the server URL properly and inject it into js files or java generated js code.

      Ludovic.

      Attachments

        Activity

          works as described

          petere Peter Eisentraut added a comment - works as described
          halkeye Gavin Mogan added a comment -

          I am closing this issue as per the last comment and the 1.3 release. Please reopen if it is still an issue.

          halkeye Gavin Mogan added a comment - I am closing this issue as per the last comment and the 1.3 release. Please reopen if it is still an issue.
          damienfinck67 Damien Finck added a comment - I think we can close this ticket because it is solved here: https://github.com/jenkinsci/html5-notifier-plugin/commit/d190dc4f982124951428ad46ada50f800283fb32
          jieryn jieryn added a comment -

          Thank you for teaching me about -Dhpi.prefix= .. I had never seen that before. I think your tests are exhaustive and good, please submit a pull request.

          jieryn jieryn added a comment - Thank you for teaching me about -Dhpi.prefix= .. I had never seen that before. I think your tests are exhaustive and good, please submit a pull request.

          I tried my changes locally in two different contexts "mvn hpi:run" and "mvn hpi:run -Dhpi.prefix=jenkins"

          I also tested it on different pages like "Administration", sub menus, "show console" from last build etc...

          Does it seems enough from your point of view ? If you know some complex test case that could be broken, don't hesitate to challenge me

          I will use this version on my team's instance to test accross our views but if it's enough I'll do a pull request as soon as possible.

          lmeur Ludovic Meurillon added a comment - I tried my changes locally in two different contexts "mvn hpi:run" and "mvn hpi:run -Dhpi.prefix=jenkins" I also tested it on different pages like "Administration", sub menus, "show console" from last build etc... Does it seems enough from your point of view ? If you know some complex test case that could be broken, don't hesitate to challenge me I will use this version on my team's instance to test accross our views but if it's enough I'll do a pull request as soon as possible.
          jieryn jieryn added a comment -

          I looked at your changes, but I think this will break when the user is not on the main page. Did you test this when inside a specific build's console output, e.g.?

          Once you confirm that this is fixed for all types of URLs, not just with and without a /jenkins context (e.g. behind a proxy) and for all types of pages the user could be on, send a pull request and we'll incorporate it!

          Your code looks good otherwise..

          jieryn jieryn added a comment - I looked at your changes, but I think this will break when the user is not on the main page. Did you test this when inside a specific build's console output, e.g.? Once you confirm that this is fixed for all types of URLs, not just with and without a /jenkins context (e.g. behind a proxy) and for all types of pages the user could be on, send a pull request and we'll incorporate it! Your code looks good otherwise..

          I forked the project from GitHub and tried to fix this problem, If your want me to pull request my modifications you're welcome.

          https://github.com/LudoMeurillon/html5-notifier-plugin

          lmeur Ludovic Meurillon added a comment - I forked the project from GitHub and tried to fix this problem, If your want me to pull request my modifications you're welcome. https://github.com/LudoMeurillon/html5-notifier-plugin

          People

            Unassigned Unassigned
            lmeur Ludovic Meurillon
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: