jenkins-init-scripts
jenkins-init-scripts copied to clipboard
Install plugins during init
I don't yet know of an easy way to install plugins during initial load time from groovy. If there was a way to do it pretty easily we could enhance the setup functions to force the plugins and their dependencies to be installed prior to initializing them.
I've made a PR that install plugin but after Jenkins has started.
I suggest you to have a look at https://github.com/jenkinsci/configuration-as-code-plugin It's a plugin that configure Jenkins based on a YAML file (instead of groovy files)