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

http://<JENKINS>/pluginManager/checkUpdates does not work without GUI / javascript

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • core
    • None

    Description

      testcases (everything scripted / headless):
      1. download war
      2. start webserver
      3. cli command install-plugin active-directory (which plugin does not matter)

      1. download war
      2. start webserver
      3. wget -O /dev/null http://<JENKINS>/pluginManager/checkUpdates
      4. cli command install-plugin active-directory (which plugin does not matter)

      e.g.
      $ java -jar /tmp/intelligence/jenkins-cli.jar -s http://localhost:8080/jenkins install-plugin active-directory
      active-directory is neither a valid file, URL, nor a plugin artifact name in the update center
      No update center data is retrieved yet from: http://updates.jenkins-ci.org/update-center.json
      active-directory looks like a short plugin name. Did you mean 'null'?

      — pieces of chat log —
      [14:25] <damien___> hello
      [14:26] <damien___> does anyone know what url triggers the webserver to fetch the update center json file?
      [14:27] <damien___> I'm trying to have a script that from a war file 1. starts it, 2. install plugins from a list
      [14:27] <damien___> list has short names
      [14:35] <mrobinet> damien___ http://<JENKINS>/pluginManager/checkUpdates
      [14:41] <damien___> mrobinet: doesn't seem to work in 1.417
      [14:41] <damien___> i'm using CLI only
      [14:41] <mrobinet> hmm
      [14:42] <mrobinet> You can't just curl that URL?
      [14:42] <damien___> i did
      [14:42] <damien___> it doesn't seem to do the right thing
      [14:43] <mrobinet> Ahh, nm, it requires auth
      [14:43] <mrobinet> Not sure if/how you can do it from CLI
      [14:43] <damien___> my instance is pristine, no auth
      [14:44] <mrobinet> I'm at a loss then. That is the URL I see posted to when I examine the net traffic when asking it to update
      [14:44] <damien___> hitting that url gives me html content that seems legit
      [14:45] <damien___> but the server doesn't go and download the json file
      [14:46] <damien___> oh my... I think I found the quirk
      [14:47] <damien___> the /pluginManager/checkUpdates page has javascript
      [14:47] <damien___> this goes and download the json file using YUI
      [14:48] <damien___> then this sends an http POST with stuff to /updateCenter/byId/default/postBack
      [14:49] <mrobinet> Yeah, that is what I see too, but I'm not sure what is missing
      [14:52] <damien___> erh, curl doesn't exec the javascript
      [14:52] <damien___> so the json doesn't get downloaded
      [14:52] <damien___> and doesn't get POST'd to jenkins instance
      [14:54] <mrobinet> I think there is a CLI to exec a custom groovy script. You might be able to use that to force the update
      [14:57] <damien___> I wonder why that code is on the user side rather than server side?
      [14:58] <damien___> mrobinet: thanks

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dnozay Damien Nozay
              Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: