• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • cli, core
    • None

      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

          [JENKINS-37212] Jenkins CLI trouble installing plugin hpi

          Daniel Beck added a comment -

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

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

          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

          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

          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.

          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.

          James Richard added a comment -

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

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

          Daniel Beck added a comment -

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

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

          Daniel Beck added a comment -

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

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

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

              Created:
              Updated:
              Resolved: