• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • build-pipeline-plugin
    • None
    • All

      In our Jenkins instance I've set up HTTP tunnels on my host machine so I don't have to log onto a windows jump box in order to access the Jenkins GUI.

      Everything is working fine, except for the build pipeline plug in.

      On the pipeline when I click the 'run' or 'console' button I get a 404 error. The error is that is can't fine the server name

      I suspect that the plugin is using absolute urls (which includes the server name) and not relative URLs

      Some users can only access the Jenkins via the Jumpbox so I can't change the Jenkins URL setting under http://<ourserver>:8080/config

          [JENKINS-31012] build-pipeline-plugin requires absolute URLs

          We seem to have the problem in a similar manner. Our Jenkins runs behind a reverse proxy on HTTPS and if you try to start a parameterised job, the plugin loads the data from an HTTP-URL. Which gets blocked by the web browsers security settings to block HTTP traffic on HTTPS-sites.

          Ubuntu 15.10 (64-bit)
          Firefox 43.0.4:
          Blocked loading mixed active content "http://jenkins.example.com/view/Test-Pipeline/job/TEST-Test-Pipeline-Launcher-1//build?delay=0sec"[Learn More] (jquery.full.js:5756:4)

          Chromium Version 47.0.2526.73:
          Mixed Content: The page at 'https://jenkins.example.com/view/Test-Pipeline/' was loaded over HTTPS, but requested an insecure resource 'http://jenkins.example.com/view/Test-Pipeline/job/TEST-Test-Pipeline-Launcher-1//build?delay=0sec'. This request has been blocked; the content must be served over HTTPS (https://jenkins.example.com/adjuncts/1b902230/org/kohsuke/stapler/jquery/jquery.full.js:5756)

          Fabian Mutzbauer added a comment - We seem to have the problem in a similar manner. Our Jenkins runs behind a reverse proxy on HTTPS and if you try to start a parameterised job, the plugin loads the data from an HTTP-URL. Which gets blocked by the web browsers security settings to block HTTP traffic on HTTPS-sites. Ubuntu 15.10 (64-bit) Firefox 43.0.4: Blocked loading mixed active content "http://jenkins.example.com/view/Test-Pipeline/job/TEST-Test-Pipeline-Launcher-1//build?delay=0sec" [Learn More] (jquery.full.js:5756:4) Chromium Version 47.0.2526.73: Mixed Content: The page at 'https://jenkins.example.com/view/Test-Pipeline/' was loaded over HTTPS, but requested an insecure resource 'http://jenkins.example.com/view/Test-Pipeline/job/TEST-Test-Pipeline-Launcher-1//build?delay=0sec'. This request has been blocked; the content must be served over HTTPS ( https://jenkins.example.com/adjuncts/1b902230/org/kohsuke/stapler/jquery/jquery.full.js:5756 )

          Bill Hurt added a comment - - edited

          I'm having a similar issue with this plugin in regular Chrome (Version 47.0.2526.111 m)

          The link to kick off the pipeline is built using HTTP when my instance is configured to only use HTTPS.

          This version is built:
          <span onclick="buildPipeline.fillDialog('http://<ServerName>/view/Test%20Server%20Reset/job/Bring%20Test%20VMs%20Online//build?delay=0sec', 'Starts the pipeline with parameters')" class="pointer"><img alt="Trigger a Pipeline" class="icon-with-caption" src="/images/24x24/clock.png"></span>

          Should Be:
          <span onclick="buildPipeline.fillDialog('https://<FQDN ServerName>/view/Test%20Server%20Reset/job/Bring%20Test%20VMs%20Online//build?delay=0sec', 'Starts the pipeline with parameters')" class="pointer"><img alt="Trigger a Pipeline" class="icon-with-caption" src="/images/24x24/clock.png"></span>

          The error causes a blank popup that should be used to enter parameters for the first job int the pipeline but is instead unusable.

          Bill Hurt added a comment - - edited I'm having a similar issue with this plugin in regular Chrome (Version 47.0.2526.111 m) The link to kick off the pipeline is built using HTTP when my instance is configured to only use HTTPS. This version is built: <span onclick="buildPipeline.fillDialog('http://<ServerName>/view/Test%20Server%20Reset/job/Bring%20Test%20VMs%20Online//build?delay=0sec', 'Starts the pipeline with parameters')" class="pointer"><img alt="Trigger a Pipeline" class="icon-with-caption" src="/images/24x24/clock.png"></span> Should Be: <span onclick="buildPipeline.fillDialog('https://<FQDN ServerName>/view/Test%20Server%20Reset/job/Bring%20Test%20VMs%20Online//build?delay=0sec', 'Starts the pipeline with parameters')" class="pointer"><img alt="Trigger a Pipeline" class="icon-with-caption" src="/images/24x24/clock.png"></span> The error causes a blank popup that should be used to enter parameters for the first job int the pipeline but is instead unusable.

          Dan Alvizu added a comment -

          The plugin uses app.rootUrl to build these links based on Jenkins best practice - this uses the 'Jenkins URL' in the /configure screen - can you verify it's been set?

          Dan Alvizu added a comment - The plugin uses app.rootUrl to build these links based on Jenkins best practice - this uses the 'Jenkins URL' in the /configure screen - can you verify it's been set?

          Bill Hurt added a comment -

          I can verify that I forgot about that setting and that it was incorrect. I put in the proper URL in and the Run button now works as expected.

          This means that the plugin now functions properly and kicks off parameterized builds as well which I think I've seen a few issues about.

          Thanks very much for the help.

          Bill Hurt added a comment - I can verify that I forgot about that setting and that it was incorrect. I put in the proper URL in and the Run button now works as expected. This means that the plugin now functions properly and kicks off parameterized builds as well which I think I've seen a few issues about. Thanks very much for the help.

          Dan Alvizu added a comment -

          Thanks hurtb

          txynidakis I misread your original issue where you can't update the Jenkins URL. Is it possible to configure your http tunnel to rewrite content and update the URL that way?

          The issue you describe will be an issue with a number of other plugins:

          https://github.com/search?utf8=%E2%9C%93&q=%22app.rootUrl%22+%22jelly%22&type=Code&ref=searchresults

          Dan Alvizu added a comment - Thanks hurtb txynidakis I misread your original issue where you can't update the Jenkins URL. Is it possible to configure your http tunnel to rewrite content and update the URL that way? The issue you describe will be an issue with a number of other plugins: https://github.com/search?utf8=%E2%9C%93&q=%22app.rootUrl%22+%22jelly%22&type=Code&ref=searchresults

          Thanks dalvizu I'll see what I can do in respect to URL rewrite.

          is it the case of the plugin using absolute URL instead of relative?

          Tony Xynidakis added a comment - Thanks dalvizu I'll see what I can do in respect to URL rewrite. is it the case of the plugin using absolute URL instead of relative?

          Dan Alvizu added a comment -

          Yes, the plugin uses absolute URLs for some of those actions (re-run, console), not relative ones

          Dan Alvizu added a comment - Yes, the plugin uses absolute URLs for some of those actions (re-run, console), not relative ones

          Dan Alvizu added a comment -

          Updated ticket to reflect issue

          Dan Alvizu added a comment - Updated ticket to reflect issue

            dalvizu Dan Alvizu
            txynidakis Tony Xynidakis
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: