I´m migrating from Jenkins 1.6 to Jenkins 2.0. I was using docker to create and run Jenkins.
And in order to configure as immutable jenkins, we used to copy all xml config files and use plugins.txt to install all necessary plugins.
But problem now is, after we init Jenkins and I connect I only see a wizard screen which ask me for a admin password, which is in a path. After put that password he ask for install plugins, which I was expecting to be installed already.
Once that I finish that wizard I don't have any plugin installed of my plugins.txt list, or I have any user passed in the users folder.
Any idea how to fix this?. in Jenkins 1.6 everything works fine.
Where do you put your
plugins.txt
? The content ofplugins.txt
will be installed inside jenkins when you build your image. So you need to rebuildjenkins:2.0
with your own dockerfile.Put the
plugins.txt
script inside the same folder. Content of myplugins.txt
Than build your image with
docker build -t my-jenkins:2.0 .
I don't know how you are migrating your jobs but I would think something like deleting the old jenkins container but keeping the persistent docker volume (or mapped folder on your host to which you're mounting). But After the build of the new jenkins start the jenkins using the
-v
option to bind to your old volume.Jenkins will start with the plugins already installed + the content of your 1.6 configuration.
I was only able to test the part with the plugins and it worked for me. After the
docker build
I performeddocker run -d -p 8080:8080 my-jenkins:2.0
. Checked thedocker logs
of that container to grab the initialAdminPassword. Didn't install any plugin in the editor and created a job. After a succesful run I saw the greenball instead of the blue.