1

In python world there is useful tool like pip freeze which dumps all currently installed python packages into a core-support plugin format. This dump can then be used to configure a new virtual environment for a new python installation.

Is there anything similar for Jenkins docker images?

I understand from the official jenkins docker image docs that it can accept a core-support plugin format file to pre-install plugins. How can i generate that file myself from an existing jenkins installation that i already have?

StephenKing
  • 36,187
  • 11
  • 83
  • 112
Rakib
  • 12,376
  • 16
  • 77
  • 113
  • Similar to [this question](http://stackoverflow.com/questions/9815273/how-to-get-a-list-of-installed-jenkins-plugins-with-name-and-version-pair). – StephenKing Jan 08 '17 at 15:01

1 Answers1

2

The following Groovy code can be entered into the Script Console available under Manage Jenkins and will output said list:

Jenkins.instance.pluginManager.plugins.sort().each{ plugin ->
  println "${plugin.getShortName()}:${plugin.getVersion()}"
}

ace-editor:1.1
analysis-collector:1.49
analysis-core:1.81
ansicolor:0.4.3
...

StephenKing
  • 36,187
  • 11
  • 83
  • 112