Closed rafabene closed 8 years ago
can you share the exact content of your plugin.txt and the buildconfig you used?
Sure. The resources are here: https://github.com/redhat-helloworld-msa/jenkins
@gabemontero you might have some thoughts here since you've done more w/ installing plugins than i have.
It seems that using openshift/jenkins-1-centos7 is fine. The problem seems to be in the latest rhel image.
A couple of thoughts (and possibly an answer):
docker run ... /bin/bash
those images without any changes.For RHEL:
/usr/lib64/jenkins/openshift-pipeline.hpi - this comes from the RPM install that @tdawson does for us
/opt/openshift/plugins/openshift-pipeline.hpi - this is an ln
from our RHEL Dockerfile for the Jenkins image
For Centos: /opt/openshift/plugins/openshift-pipeline.jpi
So I suspect the plugins.sh scirpt needs to do some special processing for the openshift-pipeline plugin where it
/opt/openshift/plugins/openshift-pipeline.hpi
link created by the RHEL dockerfile/opt/openshift/plugins/openshift-pipeline.jpi
file to override the existing pluginI do know from the work I did for the jenkins extended test on origin that user the "jpi" suffix is the way to override an existing plugin install with a new version.
if that's true, shouldn't it have taken precedence over the .hpi symlink? I can't remember from @rafabene's original problem if we knew which one took precedence or there was some conflict with both of them getting loaded? If the jpi is in fact taking precedence, it sounds like we're fine as is.
Special processing to handle all the .hpi files we might already included in the image is scary.
Well, perhaps I misread the doc I found, or it is incorrect :-) ... for reference, it is here
And looking back, with our centos image only having a .jpi file, perhaps was is happening with the jenkins extended test is that we are replacing the plugin file vs. having 2 copies and the jpi file overrides the hpi file.
Probably just need to try the theory out. We could make the change generic in plugins.sh, where it looks for any file with the same base file name with a .hpi suffix and remove it before copying over the .jpi file.
I circled back to this and believe I have a solution. My theory of having both the hpi and jpi files present seems to have been correct. A change to the rhel7 docker file's ln so that the destination file ends with jpi makes it copacetic with the plugins.sh
script. That script's download and its replacing of the jpi file now works the same was as it does with the centos image, as we are only dealing with jpi files.
I'll submit a PR momentarily.
fyi i did a little research on hpi vs jpi when looking into this the other day and the answer is just that hpi is a hudson(ie the old name for jenkins) plugin extension and jpi is a jenkins plugin extension. so we should always be using jpi at this point, rather than calling something hpi and then trying to override it with a jpi.
all of which goes to say it sounds like your plan aligns w/ that anyway.
I have dumped my desired Jenkins dependencies in a plugin.txt file.
Following the instructions of the s2i custom-build, I ended with two openshift-pipeline.hpi in /var/lib/jenkins/plugin folder
41 May 19 03:21 openshift-pipeline.hpi -> /usr/lib64/jenkins/openshift-pipeline.hpi 4124260 May 19 03:21 openshift-pipeline.jpi
This also happened with: