[JIRA] (JENKINS-60548) plugin installation ignores version number setting

4 views
Skip to first unread message

neufpas@gmail.com (JIRA)

unread,
Dec 19, 2019, 2:03:02 PM12/19/19
to jenkinsc...@googlegroups.com
Fritz Platzke created an issue
 
Jenkins / Bug JENKINS-60548
plugin installation ignores version number setting
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2019-12-19 19:02
Priority: Minor Minor
Reporter: Fritz Platzke

I am having an issue installing plugins via groovy script. It seems that the version argument is being completely ignored.

This is a bit of sample code which should install version 2.0.0 of the prometheus plugin. The code runs but it just defaults to the most recent version.

import hudson.util.VersionNumber import jenkins.model.* def instance = Jenkins.getInstance() def pm = instance.getPluginManager() def uc = instance.getUpdateCenter() uc.updateAllSites() plugin = uc.getPlugin("prometheus", new VersionNumber("2.0.0")) def installer = plugin.deploy()

I have replicated this issue with other versions of plugins and none of them will install a previous version. It just always defaults to the most recent version.

This is happening on Jenkins 2.204.1 running on linux using the the rpm install.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

neufpas@gmail.com (JIRA)

unread,
Dec 19, 2019, 3:05:02 PM12/19/19
to jenkinsc...@googlegroups.com
Fritz Platzke updated an issue
Change By: Fritz Platzke
I am having an issue installing plugins via groovy script. It seems that the version argument is being completely ignored.

This is a bit of sample code which should install version 2.0.0 of the prometheus plugin. The code runs but it just defaults to the most recent version.
{code:java}
import hudson.util.VersionNumber

import jenkins.model.*

def instance = Jenkins.getInstance()
def pm = instance.getPluginManager()
def uc = instance.getUpdateCenter()
uc.updateAllSites()
plugin = uc.getPlugin("prometheus", new VersionNumber("2.0.0"))
def installer = plugin.deploy(){code}

I have replicated this issue with other versions of plugins and none of them will install a previous version. It just always defaults to the most recent version.

This is happening on Jenkins 2.204.1 running on linux using the the rpm install.
Reply all
Reply to author
Forward
0 new messages