kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch11/docker-images/jenkins/scripts/install-plugins.groovy

15 lines
283 B
Groovy
Raw Normal View History

#!groovy
import jenkins.model.Jenkins;
pm = Jenkins.instance.pluginManager
uc = Jenkins.instance.updateCenter
pm.doCheckUpdatesServer()
["git", "workflow-aggregator"].each {
if (! pm.getPlugin(it)) {
deployment = uc.getPlugin(it).deploy(true)
deployment.get()
}
}