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

Jenkins CLI trouble installing plugin hpi

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Duplicate
    • cli, core
    • None

    Description

      Using Jenkins 1.642.4, I installed an older version of my plugin from a hpi file using the Jenkins CLI and did a safe restart. When I try to install a newer version of the same plugin using the Jenkins CLI, http://localhost:8080/pluginManager/installed still shows the older version is installed even after a safe restart.

      Manually uploading the files to the server works fine, I can upgrade/downgrade and install any specific version without trouble. There is only an issue when I use the Jenkins CLI

      When installing a plugin manually, it creates a

      {plugin-name}.bak

      file but when I use the CLI it creates a

      {plugin-name}-{version}.bak

      I assume this might be the cause of the issue

      Attachments

        Issue Links

          Activity

            danielbeck Daniel Beck added a comment -

            what's the full command line for the CLI you use? No placeholders, everything verbatim including plugin file name.

            danielbeck Daniel Beck added a comment - what's the full command line for the CLI you use? No placeholders, everything verbatim including plugin file name.
            jrichard James Richard added a comment -

            java -jar jenkins-cli.jar -s http://localhost:8080/ install-plugin hub-jenkins-1.5.3-SNAPSHOT.hpi

            followed by

            java -jar jenkins-cli.jar -s http://localhost:8080/ safe-restart

            jrichard James Richard added a comment - java -jar jenkins-cli.jar -s http://localhost:8080/ install-plugin hub-jenkins-1.5.3-SNAPSHOT.hpi followed by java -jar jenkins-cli.jar -s http://localhost:8080/ safe-restart
            danielbeck Daniel Beck added a comment -

            The -name argument lets you override the automatically determined plugin name based on the file name.

            Since the plugin has a different file name, it gets installed in addition to the regular one, and then they probably clash, and the wrong one is loaded or something.

            danielbeck Daniel Beck added a comment - The -name argument lets you override the automatically determined plugin name based on the file name. Since the plugin has a different file name, it gets installed in addition to the regular one, and then they probably clash, and the wrong one is loaded or something.
            jrichard James Richard added a comment -

            Thank you danielbeck using the -name argument solves the issue we are having and everything works as expected now

            jrichard James Richard added a comment - Thank you danielbeck using the -name argument solves the issue we are having and everything works as expected now
            danielbeck Daniel Beck added a comment -

            Behavior remains stupid, so let's keep it around as a low priority bug.

            danielbeck Daniel Beck added a comment - Behavior remains stupid, so let's keep it around as a low priority bug.
            danielbeck Daniel Beck added a comment -

            Behavior has been fixed in the context of JENKINS-32358.

            danielbeck Daniel Beck added a comment - Behavior has been fixed in the context of JENKINS-32358 .

            People

              danielbeck Daniel Beck
              jrichard James Richard
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: