Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase Jenkins version and use plugin installation manager tool #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
ARG JENKINS_VERSION=2.240
ARG JENKINS_VERSION=2.263
FROM jenkins/jenkins:$JENKINS_VERSION
MAINTAINER Oleg Nenashev <[email protected]>
LABEL Description="This demo shows how to setup Jenkins Config-as-Code with Docker, Pipeline, and Groovy Hook Scripts" Vendor="Oleg Nenashev" Version="0.2"

# Plugin Installation Manager
ARG PLUGIN_MANAGER_TOOL_VERSION=1.0.2
RUN wget https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/plugin-management-parent-pom-$PLUGIN_MANAGER_TOOL_VERSION/jenkins-plugin-manager-$PLUGIN_MANAGER_TOOL_VERSION.jar -O /usr/share/jenkins/ref/jenkins-plugin-manager.jar

ENV JENKINS_UC_EXPERIMENTAL=https://updates.jenkins.io/experimental
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt
RUN jenkins-plugin-cli --plugin-file /usr/share/jenkins/ref/plugins.txt
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--war option needs to be passed so that the tool consults with version compatibility requirements

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the hint!

However, after consulting the documentation:

--war or -w: (optional) Path to Jenkins war file. If no war file is entered, will default to /usr/share/jenkins/jenkins.war or C:\ProgramData\Jenkins\jenkins.war, depending on the user's OS.

... and inspecting the Docker container:

docker run -it --rm --name jenkins -e DEV_HOST=10.1.114.226 -p 8080:8080 -p 50000:50000 xortex/jenkins:0.2 /bin/bash
jenkins@52ea5cf6e190:/$ ls -la /usr/share/jenkins/jenkins.war
-rw-r--r-- 1 root root 67242720 Oct 20 14:57 /usr/share/jenkins/jenkins.war

... I think this is not necessary (anymore?), because the default should be sufficient, shouldn't it?


COPY init_scripts/src/main/groovy/ /usr/share/jenkins/ref/init.groovy.d/

Expand Down