25 lines
758 B
YAML
25 lines
758 B
YAML
# services/jenkins/configmap-init-scripts.yaml
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: jenkins-init-scripts
|
|
namespace: jenkins
|
|
data:
|
|
theme.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")
|
|
}
|