Skip to content

Replace custom plugin management implementation by Plugin Installation Manager #248

@gluehbirnenkopf

Description

@gluehbirnenkopf

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!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestroadmapThis issue represents a major topic on the Jenkinsfile Runner roadmap

Type

No type

Projects

Status

🔖 Ready

Status

In progress / Preview

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions