Closed rajcheval closed 6 years ago
Due to the fast software development cycles from the Jenkins crew some features break from time to time. I will have to check for myself what's happening in the latest version.
Thank you for your help. We have been using your jenkins image for the past few months and it has been working well.
I tried with the latest image blacklabelops/jenkins:latest
.
Doing a brand new install. hipchat:2.1.0
will not be installed but hipchat
works. That means, that the specified version does not work with the Jenkins version.
I can see everything in logs:
Fail
INFO: Checking hipchat:2.1.0
Mar 14, 2018 3:59:48 PM java.util.logging.LogManager$RootLogger log
INFO: Looking UpdateCenter for hipchat:2.1.0
Mar 14, 2018 3:59:48 PM java.util.logging.LogManager$RootLogger log
INFO: Checking swarm
Success
INFO: Checking hipchat
Mar 14, 2018 4:07:52 PM java.util.logging.LogManager$RootLogger log
INFO: Looking UpdateCenter for hipchat
Mar 14, 2018 4:07:52 PM java.util.logging.LogManager$RootLogger log
INFO: Installing hipchat
Used command:
docker run --name jenkins -e "JENKINS_PLUGINS=gitlab-plugin hipchat swarm" -p 8090:8080 blacklabelops/jenkins
are you running your container on mac os? I am doing this on macbook pro. I just ran this command and I don't see any plugins installed. See the details logs:
MacBook-Pro:~ rajindersingh$ docker run --name jenkins -e "JENKINS_PLUGINS=gitlab-plugin hipchat swarm" -p 8090:8080 blacklabelops/jenkins:latest --debug=9 Unable to find image 'blacklabelops/jenkins:latest' locally latest: Pulling from blacklabelops/jenkins ff3a5c916c92: Already exists 89da71374447: Pull complete 6b22ae133bd3: Pull complete ffdde01e4e37: Pull complete 82082d822605: Pull complete ad9b511ed449: Pull complete f256a48ab925: Pull complete Digest: sha256:97acda66f41045fed12460ad19d93c4329cd39330abc93e24746eb93d6c2f92f Status: Downloaded newer image for blacklabelops/jenkins:latest
It turns out that adding --debug=9 does not install the plugins.
Based on your comment above it seems that I can specify the version of plugin and it will install correctly as long as it is compatible with the version of Jenkins.
Am I correct?
I found that if I specify the version number for a plugin it is not installed. This happens even if plugin is compatible with Jenkins version.
docker run --name jenkins2 -e "JENKINS_PLUGINS=gitlab-plugin hipchat:2.1.1 swarm azure-ad:0.2.0 " -p 8090:8080 blacklabelops/jenkins:latest
In my example hipchat 2.1.1 is the latest version and is compatible with Jenkins.
https://gist.github.com/rajcheval/81fc90f09854fd813473065307612750
If I remove version_number hipchat plugin gets installed.
I will recheck this, version numbers should work!
This fixes your issue that there are no installation scripts running when you pass parameters, e.g. --debug=9
.
Here it is documented, that the Jenkins Update Center only allows to install the latest version of a plugin: https://jenkins.io/doc/book/managing/plugins/
I am using the update center for my plugin install. Very handy because it automatically also installs all dependencies. So apparently the version feature, e.g. hipchat:2.1.1
does not work anymore.
If you want a specific version of a plugin there is, according to the article, only the Advanced installation
routine left. Which means you have to download and install the plugin files by yourself manually.
I have found an appropriate script in the official jenkins image: https://github.com/jenkinsci/docker/blob/master/install-plugins.sh
Maybe it is better to switch to the official one for you.
Steffen,
Thank you for your help today. I appreciate it. We will either incorporate a new script into your image or start using the official image.
Raj
We had a need to install specific version of plugins. We followed the documentation and attempted to stand up a new jenkins using this command:
docker run --name jenkins -e "JENKINS_PLUGINS=gitlab-plugin hipchat:2.1.0 swarm" -p 8090:8080 blacklabelops/jenkins --debug=9
Jenkins came up but when I went to Jenkins UI, went to manage plugins, installed plugin I did not see any plugins installed.
I assumed that adding :version number of the plugin was the problem so I ran
docker run --name jenkins -e "JENKINS_PLUGINS=gitlab-plugin hipchat swarm" -p 8090:8080 blacklabelops/jenkins --debug=9
Even after running this command I do not see any plugins installed.
Finally I ran this command:
docker run --name jenkins -p 8090:8080 blacklabelops/jenkins --debug=9
Even in this case I don't see any plugins installed.
Can you let us know how we can specify a list of plugins and their version via command line?
Thanks