A theme is a Jenkins plugin that includes:
- 0 or more CSS files
- 0 or more JavaScript files
Theme discovery in Jenkins uses the ThemeManagerFactory extension point.
Create a plugin from the empty plugin
Jenkins archetype.
You will need to extend/implement:
Take a look at the dark-theme-plugin for a sample implementation.
You can find all the available variables provided by Jenkins core in theme.less. Plugins may also define their own variables so this list may not be complete, but it should cover most of them.
Don't forget to add @Extension
to your descriptor
and UnprotectedRootAction
.
Add a symbol to your descriptor
for a nice short name when using configuration-as-code, e.g. @Symbol("neo2")
.
Run mvn hpi:run
from your plugin directory, that will startup a test instance of Jenkins.
Visit http://localhost:8080/jenkins in your browser and configure your theme from there.
Follow the hosting guide.
Send a pull request to this plugin's README to add it to the known plugins list (once the plugin is in the Jenkins update center).