diff --git a/services/jenkins/deployment.yaml b/services/jenkins/deployment.yaml index 7dff5af..0b62ee0 100644 --- a/services/jenkins/deployment.yaml +++ b/services/jenkins/deployment.yaml @@ -94,7 +94,6 @@ spec: - -c - | set -e - mkdir -p /var/jenkins_home/userContent exec env $(cat /vault/secrets/jenkins-env) /usr/bin/tini -- /usr/local/bin/jenkins.sh ports: - name: http @@ -155,9 +154,6 @@ spec: mountPath: /usr/share/jenkins/ref/init.groovy.d - name: init-scripts mountPath: /var/jenkins_home/init.groovy.d - - name: init-scripts - mountPath: /var/jenkins_home/userContent/jenkins-theme.css - subPath: jenkins-theme.css - name: plugin-dir mountPath: /usr/share/jenkins/ref/plugins - name: tmp diff --git a/services/jenkins/kustomization.yaml b/services/jenkins/kustomization.yaml index 444dd6d..aab859a 100644 --- a/services/jenkins/kustomization.yaml +++ b/services/jenkins/kustomization.yaml @@ -18,7 +18,6 @@ configMapGenerator: - name: jenkins-init-scripts namespace: jenkins files: - - jenkins-theme.css=scripts/jenkins-theme.css - git-notify-token.groovy=scripts/git-notify-token.groovy - theme.groovy=scripts/theme.groovy options: diff --git a/services/jenkins/scripts/jenkins-theme.css b/services/jenkins/scripts/jenkins-theme.css deleted file mode 100644 index 56fe193..0000000 --- a/services/jenkins/scripts/jenkins-theme.css +++ /dev/null @@ -1,97 +0,0 @@ -@import url("https://cdn.jsdelivr.net/gh/Jorg3Lucas/jenkins-modern-themes@main/dist/modern-blue-grey.css"); - -:root { - --atlas-bg: #0f1216; - --atlas-surface: #171b21; - --atlas-surface-alt: #1f252d; - --atlas-border: #2b313b; - --atlas-text: #e6e9ef; - --atlas-text-muted: #b3bac6; - --atlas-link: #8fb7ff; -} - -body, -#page-body, -#page-header, -#header, -#main-panel, -#main-panel-content, -#side-panel, -.top-sticker-inner, -.bottom-sticker-inner, -#breadcrumbBar, -#breadcrumbs { - background-color: var(--atlas-bg) !important; - color: var(--atlas-text) !important; -} - -#side-panel .task-link, -#breadcrumbs a, -#breadcrumbs, -#projectstatus th a, -#projectstatus td, -#projectstatus th { - color: var(--atlas-text-muted) !important; -} - -a, -a:visited, -a:link { - color: var(--atlas-link) !important; -} - -a:hover { - opacity: 0.85; -} - -#main-panel, -#main-panel-content, -#description, -.pane, -table.pane { - background-color: var(--atlas-surface) !important; - color: var(--atlas-text) !important; -} - -table.pane tr:nth-child(odd) td { - background-color: var(--atlas-surface) !important; -} - -table.pane tr:nth-child(even) td, -#projectstatus tr:hover td { - background-color: var(--atlas-surface-alt) !important; -} - -input, -select, -textarea, -#search-box { - background-color: var(--atlas-surface-alt) !important; - color: var(--atlas-text) !important; - border-color: var(--atlas-border) !important; -} - -#header, -#page-header { - background-color: #202734 !important; -} - -#header .login, -#page-header .login { - color: var(--atlas-text) !important; -} - -#side-panel .task-link, -#side-panel .task-link:visited, -#side-panel .task-link:hover { - color: var(--atlas-text) !important; -} - -#footer { - background-color: var(--atlas-bg) !important; - color: var(--atlas-text-muted) !important; -} - -.jenkins_ver:after { - content: "atlas dark"; -} diff --git a/services/jenkins/scripts/theme.groovy b/services/jenkins/scripts/theme.groovy index fd12474..b20169c 100644 --- a/services/jenkins/scripts/theme.groovy +++ b/services/jenkins/scripts/theme.groovy @@ -6,7 +6,104 @@ def decorators = instance.getExtensionList(SimpleThemeDecorator.class) if (decorators?.size() > 0) { def theme = decorators[0] - theme.setCssUrl("https://ci.bstein.dev/userContent/jenkins-theme.css") + theme.setCssUrl("https://cdn.jsdelivr.net/gh/Jorg3Lucas/jenkins-modern-themes@main/dist/modern-blue-grey.css") + theme.setCssRules(""" +:root { + --atlas-bg: #0f1216; + --atlas-surface: #171b21; + --atlas-surface-alt: #1f252d; + --atlas-border: #2b313b; + --atlas-text: #e6e9ef; + --atlas-text-muted: #b3bac6; + --atlas-link: #8fb7ff; +} + +body, +#page-body, +#page-header, +#header, +#main-panel, +#main-panel-content, +#side-panel, +.top-sticker-inner, +.bottom-sticker-inner, +#breadcrumbBar, +#breadcrumbs { + background-color: var(--atlas-bg) !important; + color: var(--atlas-text) !important; +} + +#side-panel .task-link, +#breadcrumbs a, +#breadcrumbs, +#projectstatus th a, +#projectstatus td, +#projectstatus th { + color: var(--atlas-text-muted) !important; +} + +a, +a:visited, +a:link { + color: var(--atlas-link) !important; +} + +a:hover { + opacity: 0.85; +} + +#main-panel, +#main-panel-content, +#description, +.pane, +table.pane { + background-color: var(--atlas-surface) !important; + color: var(--atlas-text) !important; +} + +table.pane tr:nth-child(odd) td { + background-color: var(--atlas-surface) !important; +} + +table.pane tr:nth-child(even) td, +#projectstatus tr:hover td { + background-color: var(--atlas-surface-alt) !important; +} + +input, +select, +textarea, +#search-box { + background-color: var(--atlas-surface-alt) !important; + color: var(--atlas-text) !important; + border-color: var(--atlas-border) !important; +} + +#header, +#page-header { + background-color: #202734 !important; +} + +#header .login, +#page-header .login { + color: var(--atlas-text) !important; +} + +#side-panel .task-link, +#side-panel .task-link:visited, +#side-panel .task-link:hover { + color: var(--atlas-text) !important; +} + +#footer { + background-color: var(--atlas-bg) !important; + color: var(--atlas-text-muted) !important; +} + +.jenkins_ver:after { + content: "atlas dark"; +} +""".stripIndent().trim()) theme.setJsUrl("") instance.save() println("Applied simple-theme-plugin dark theme")