17 lines
540 B
Groovy
17 lines
540 B
Groovy
import jenkins.model.Jenkins
|
|
import org.codefirst.SimpleThemeDecorator
|
|
|
|
def instance = Jenkins.get()
|
|
def decorators = instance.getExtensionList(SimpleThemeDecorator.class)
|
|
|
|
if (decorators?.size() > 0) {
|
|
def theme = decorators[0]
|
|
theme.setCssUrl("https://jenkins-contrib-themes.github.io/jenkins-material-theme/dist/material-ocean.css")
|
|
theme.setJsUrl("")
|
|
theme.setTheme("")
|
|
instance.save()
|
|
println("Applied simple-theme-plugin dark theme")
|
|
} else {
|
|
println("simple-theme-plugin not installed; skipping theme configuration")
|
|
}
|