I realize this is something of a necro, but for future people coming by, 
this will help:

Use Jenkins-CLI to retrieve a list of plugins installed in the instance:

java -jar jenkins-cli.jar -s http://10.10.18.10:9000/ list-plugins

jdk-tool                           JDK Tool Plugin                              
                    1.2
build-timeout                      Build Timeout                                
                    1.19
resource-disposer                  Resource Disposer Plugin                     
                    0.12
jsch                               JSch dependency plugin                       
                    0.1.55
workflow-scm-step                  Pipeline: SCM Step                           
                    2.7
...


You can also get this via

$ JENKINS_HOST=username:passw...@myhost.com:port

$ curl -sSL 
"http://$JENKINS_HOST/pluginManager/api/xml?depth=1&xpath=/*/*/shortName|/*/*/version&wrapper=plugins"
 
| perl -pe 's/.*?<shortName>([\w-]+).*?<version>([^<]+)()(<\/\w+>)+/\1 
\2\n/g'|sed 's/ /:/'


Example Output:

cucumber-testresult-plugin:0.8.2
pam-auth:1.1
matrix-project:1.4.1
script-security:1.13
...



This is from https://github.com/jenkinsci/docker/blob/master/README.md

Then you can use a file with the format of
<plugin-name>:<version>
<plugin-name>:<version>
<plugin-name>:<version>
....

And copy it over in your Dockerfile, then use it as input for 
install-plugins.sh

Dockerfile:
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/plugins.txt

It's quite a bit irritating though when you come to updating those plugins 
later on. And I haven't found a solution for it yet.


Am Donnerstag, 13. September 2018 13:42:43 UTC+2 schrieb Thomas Sundberg:
>
> Hi! 
>
> I am creating a Jenkins installation from a Dockerfile. I want to 
> specify all plugins so they are available when the image is built. 
>
> This typically looks like many lines like this: 
>
> RUN /usr/local/bin/install-plugins.sh greenballs 
>
> Is there a way to find the proper name for each plugin? I am currently 
> looking for the proper name for the Docker Pipeline 
> Plugin,https://wiki.jenkins.io/display/JENKINS/Docker+Pipeline+Plugin 
>
> Cheers, 
> Thomas 
>
> -- 
> Thomas Sundberg 
> M. Sc. in Computer Science 
>
> Mobile: +46 70 767 33 15 
> Blog: http://www.thinkcode.se/blog 
> Twitter: @thomassundberg 
>
> Better software through faster feedback 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/da81f9f9-5945-45f1-b77a-ca3a60f21e52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to