Issue
I’m starting to use Configuration as Code (CasC) for Controllers, and I’m finding it’s very time consuming to create the plugin-catalog.yaml and plugins.yaml as part of Creating a CasC bundle for controllers
Resolution
If you find it’s time consuming to generate the plugin-catalog.yaml and plugins.yaml with all of the correct transitive dependencies manually or using a tool you wrote yourself, you can utilize the following tool:
To use this tool:
-
Go to
Manage Jenkins→CloudBees Configuration as Code export and updateand download theplugins.yamlfrom your instance you would like to start using CasC with (in this example, saving it to~/Downloads/plugins.yaml). -
Download or clone the repo: https://github.com/kyounger/casc-plugin-dependency-calculation
-
Follow the README to use the tool to generate your
plugin-catalog.yamlandplugins.yaml:
./run.sh -v 2.401.3.3 -f ~/Downloads/plugins.yaml -F ~/casc-bundle/plugins.yaml -c ~/casc-bundle/plugin-catalog.yaml
In offline/air gapped environments, use the -C FILE and -D STRING arguments documented here to generate a plugin catalog with the url: set to your own server hosting the plugin hpi files.
|
The result of this command will write the output files at the chosen paths, in this case ~/casc-bundle/plugins.yaml and ~/casc-bundle/plugin-catalog.yaml.
Tested product/plugin versions
-
CloudBees CI on modern cloud platforms - managed controller 2.401.3.3
-
commit 616b3d02c2e4ba26cd02653ddf7f39c4dacde743 of casc-plugin-dependency-calculation, though please use the latest when you run it