Jenkins plugin (specific version) fleet upgrade

138 views
Skip to first unread message

alok joshi

unread,
Nov 18, 2016, 8:05:43 PM11/18/16
to Jenkins Users

I have a large fleet of Jenkins instances running in a cluster, all having the LDAP plugin version 1.6 (Jenkins version 1.611). I want to fleet-upgrade the LDAP plugin version to 1.7 (to incorporate environment variables in my plugin configuration). How do I achieve this without manually uploading 1.7 version through UI for each Jenkins instance?

I tried writing a script which basically performs these operations for each Jenkins instance:

  1. 1. Replace the existing .jpi/.hpi file in $JENKINS_HOME/plugins for ldap plugin with the correct .hpi file (of the 1.7 version)
  2. 2. Edit config.xml under $JENKINS_HOME which has the version number
  3. 3. Safe restart Jenkins

It works fine till step 2 but as soon as I perform safe restart, Jenkins magically puts in the original .jpi/.hpi file (the 1.6 version file) back inside $JENKINS_HOME/plugins. Jenkins instance has the 1.6 plugin version again in the UI. Is there a better way to perform fleet plugin upgrades in general? I want to mention that I want the 1.7 plugin version, not the latest

How do I fix this? I even tried using curl (mentioned at http://stackoverflow.com/a/20848745/1746529) but didn't help.

Stephen Connolly

unread,
Nov 19, 2016, 10:12:47 AM11/19/16
to jenkins...@googlegroups.com
As you are on 1.x create an empty ldap.jpi.pinned file as a sibling and that marker will instruct Jenkins not to replace with the bundled plugin.

On 2.x (why are you waiting?) the whole pinned & bundled concepts were removed so this would not be an issue for you

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/37002132-3170-41df-a713-55caebdca064%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Sent from my phone

alok joshi

unread,
Nov 21, 2016, 2:44:17 AM11/21/16
to Jenkins Users
That worked like a charm, thanks! Came across the documentation for it as well - https://wiki.jenkins-ci.org/display/JENKINS/Pinned+Plugins

Yes, Jenkins 2.0 update is long due :)
Reply all
Reply to author
Forward
0 new messages