question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace custom plugin management implementation by Plugin Installation Manager

See original GitHub issue

The custom implementation of Jenkinsfile Runner plugin management should be replaced by https://github.com/jenkinsci/plugin-installation-manager-tool/ so that there is no duplication and unexpected behavior

Depends on:

Original request

Hi,

im trying to insert plugins via plugin.txt into the pre-built image as stated out in readme.md of this project. Unfortunately it always fails. I guess its because it cant determine the version of the .war file and therefore loads incorrect dependencies.

I guess it is trying to download the latest dependencies but as the image from this repos master branch is 2.176.2, it fails.

FROM jenkins4eval/jenkinsfile-runner
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN cd /app/jenkins && jar -cvf jenkins.war *
RUN java -jar /app/bin/jenkins-plugin-manager.jar --war /app/jenkins/jenkins.war --plugin-file /usr/share/jenkins/ref/plugins.txt && rm /app/jenkins/jenkins.war

See here the line “Unable to get version from war file.”

Reading in plugins from /usr/share/jenkins/ref/plugins.txt

No directory to download plugins entered. Will use default of /usr/share/jenkins/ref/plugins
Using update center https://updates.jenkins.io from JENKINS_UC environment variable
No CLI option or environment variable set for experimental update center, using default of https://updates.jenkins.io/experimental
No CLI option or environment variable set for incrementals mirror, using default of https://repo.jenkins-ci.org/incrementals
Will use war file: /app/jenkins/jenkins.war
Unable to get version from war file

Downloading plugin ace-editor from url: https://updates.jenkins.io/download/plugins/ace-editor/1.0.1/ace-editor.hpi

The plugin download works of course but when i start my jenkins docker image I end up in dependency and unsupported version errors:

Leon$ docker run --rm -v $(pwd)/Jenkinsfile:/workspace/Jenkinsfile -v $(pwd)/config/jenkins.yaml:/usr/share/jenkins/ref/casc/jenkins.yaml 530bb9b3e3a2
2020-02-14 05:41:23.301+0000 [id=24]	SEVERE	jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Pipeline Utility Steps v2.5.0 (pipeline-utility-steps)
java.io.IOException: Pipeline Utility Steps version 2.5.0 failed to load.
 - Pipeline: Groovy version 2.56 is older than required. To fix, install version 2.58 or later.
	at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:868)
	at hudson.PluginManager$2$1$1.run(PluginManager.java:544)
	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1095)
	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
2020-02-14 05:41:23.307+0000 [id=23]	SEVERE	jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Credentials Plugin v2.3.1 (credentials)
java.io.IOException: Credentials Plugin version 2.3.1 failed to load.
 - Configuration as Code Plugin version 1.32 is older than required. To fix, install version 1.35 or later.
	at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:868)
	at hudson.PluginManager$2$1$1.run(PluginManager.java:544)
	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1095)
	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
...

What im doing wrong?

Thanks for your help!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
oleg-nenashevcommented, Feb 18, 2020

It is included into the Docker image as a standalone CLI tool, but it is not used in the Jenkinsfile Runner binary at the moment. It has it’s own plugin download implementation. It needs to be replaced, but I am not able to do it due to some non-technical reasons

0reactions
oleg-nenashevcommented, Oct 19, 2021

Once https://github.com/jenkinsci/plugin-installation-manager-tool/issues/237 is completed, we will be able to replace the custom implementation alltogether

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plugin Installation Manager CLI Tool / Library - Jenkins
Plugin Installation Manager CLI Tool / Library. Goal: Create a new library and tools to unify plugin management across the Jenkins ecosystem.
Read more >
Best practices for installing plugins on production instances
To install plugins from the Plugin Manager: From your CloudBees product, select Manage Jenkins Manage Plugins. Verify that the plugin is not already...
Read more >
jenkinsci/plugin-installation-manager-cli-tool - Gitter
The plugin installation manager provides a consistent set of plugins in its report, with dependencies resolved correctly and completely.
Read more >
How to Install Jenkins Plugins From Command Line Using the ...
... Overview00:49 Starting point01:01 Create a pipeline using the touch step03:04 Download Plugin Installation Manager Tool06...
Read more >
Jenkins Manage Plugins - How to manage, update & uninstall
How to install a plugin manually in Jenkins? And, how to upgrade the plugin in Jenkins? How to uninstall the plugin in Jenkins?...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found