diff --git a/services/jenkins/helmrelease.yaml b/services/jenkins/helmrelease.yaml index 74587db..a5c2af3 100644 --- a/services/jenkins/helmrelease.yaml +++ b/services/jenkins/helmrelease.yaml @@ -170,6 +170,23 @@ spec: println("Failed to configure OIDC realm: ${e}") throw e } + 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") + } JCasC: defaultConfig: false securityRealm: "" @@ -244,10 +261,6 @@ spec: creationOfLegacyTokenEnabled: false tokenGenerationOnCreationEnabled: false usageStatisticsEnabled: true - unclassified: - simple-theme-plugin: - elements: - - cssUrl: "https://jenkins-contrib-themes.github.io/jenkins-material-theme/dist/material-ocean.css" creds.yaml: | credentials: system: