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

when jenkins is running with a prefix managed-scripts.js loads from / instead of /prefix on the project configure page

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: managed-scripts-plugin
    • Labels:
      None
    • Environment:
      Solaris 10
      Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
      Jenkins 1.446
      managed-scripts 0.1.0
      config-file-provider 1.2

    • Similar Issues:

      Description

      When jenkins is started with a prefix:

      java -jar jenkins.war --prefix=/dev

      on the project -> configure page when the Add build step -> Execute managed script pull down is selected a request is generated for /plugin/managed-scripts/js/managed-scripts.js instead of /dev/plugin/managed-scripts/js/managed-scripts.js and nothing happens in the UI.

        Attachments

          Activity

          Hide
          wtessier William Tessier added a comment -

          It looks like patching managed-scripts:

          — a/src/main/resources/org/jenkinsci/plugins/managedscripts/ScriptBuildStep/config.jelly
          +++ b/src/main/resources/org/jenkinsci/plugins/managedscripts/ScriptBuildStep/config.jelly
          @@ -1,7 +1,7 @@
          <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">

          <st:once>

          • <script type="text/javascript" src="/plugin/managed-scripts/js/managed-scripts.js" />
            + <script type="text/javascript" src="${rootURL}/plugin/managed-scripts/js/managed-scripts.js" />
            </st:once>
            <j:choose>
            <j:when test="${empty(descriptor.availableBuildTemplates)}">

          and config-file-provider:

          — a/src/main/resources/org/jenkinsci/plugins/configfiles/buildwrapper/ConfigFileBuildWrapper/config.jelly
          +++ b/src/main/resources/org/jenkinsci/plugins/configfiles/buildwrapper/ConfigFileBuildWrapper/config.jelly
          @@ -9,7 +9,7 @@

          <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
          <st:once>

          • <script type="text/javascript" src="/plugin/config-file-provider/js/fileprovider.js" />
            + <script type="text/javascript" src="${rootURL}/plugin/config-file-provider/js/fileprovider.js" />
            </st:once>

          <f:entry title="${%Managed Files}">

          seems to fix the issues on a prefixed jenkins install

          Show
          wtessier William Tessier added a comment - It looks like patching managed-scripts: — a/src/main/resources/org/jenkinsci/plugins/managedscripts/ScriptBuildStep/config.jelly +++ b/src/main/resources/org/jenkinsci/plugins/managedscripts/ScriptBuildStep/config.jelly @@ -1,7 +1,7 @@ <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> <st:once> <script type="text/javascript" src="/plugin/managed-scripts/js/managed-scripts.js" /> + <script type="text/javascript" src="${rootURL}/plugin/managed-scripts/js/managed-scripts.js" /> </st:once> <j:choose> <j:when test="${empty(descriptor.availableBuildTemplates)}"> and config-file-provider: — a/src/main/resources/org/jenkinsci/plugins/configfiles/buildwrapper/ConfigFileBuildWrapper/config.jelly +++ b/src/main/resources/org/jenkinsci/plugins/configfiles/buildwrapper/ConfigFileBuildWrapper/config.jelly @@ -9,7 +9,7 @@ <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> <st:once> <script type="text/javascript" src="/plugin/config-file-provider/js/fileprovider.js" /> + <script type="text/javascript" src="${rootURL}/plugin/config-file-provider/js/fileprovider.js" /> </st:once> <f:entry title="${%Managed Files}"> seems to fix the issues on a prefixed jenkins install
          Hide
          domi Dominik Bartholdi added a comment -

          Fixed in version 0.2.0

          Show
          domi Dominik Bartholdi added a comment - Fixed in version 0.2.0

            People

            • Assignee:
              domi Dominik Bartholdi
              Reporter:
              wtessier William Tessier
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: