Skip to content

Instantly share code, notes, and snippets.

@gustavohenrique
Created November 14, 2013 11:11
Show Gist options
  • Save gustavohenrique/7465087 to your computer and use it in GitHub Desktop.
Save gustavohenrique/7465087 to your computer and use it in GitHub Desktop.
Steps to customize the Jenkins graphical user interface
# Login
core/src/main/resources/jenkins/model/Jenkins/login.jelly
# Main page
core/src/main/resources/lib/layout/layout.jelly
core/src/main/resources/hudson/views/BuildButtonColumn/column.jelly
core/src/main/resources/lib/hudson/iconSize.jelly
core/src/main/resources/lib/hudson/rssBar.jelly
# Build
core/src/main/resources/hudson/model/AbstractBuild/index.jelly
core/src/main/resources/hudson/model/CauseAction/summary.jelly
core/src/main/resources/hudson/model/Run/logKeep.jelly
core/src/main/resources/lib/hudson/artifactList.jelly
# Job
core/src/main/resources/hudson/model/AbstractProject/main.jelly
core/src/main/resources/hudson/model/FreeStyleProject/newJobDetail.jelly
core/src/main/resources/hudson/model/Job/index.jelly
core/src/main/resources/hudson/model/Job/permalinks.jelly
core/src/main/resources/lib/hudson/project/projectActionFloatingBox.jelly
core/src/main/resources/hudson/widgets/HistoryWidget/entry.jelly
# New job/Copy existing Job
core/src/main/resources/lib/hudson/newFromList/form.jelly
# Configure
core/src/main/resources/lib/form/block.jelly
core/src/main/resources/lib/form/entry.jelly
# Replace logo and icons
war/src/main/webapp/images/jenkins.png
war/src/main/webapp/images/title.png
war/src/main/webapp/images/topbar.png
war/src/main/webapp/images/favicon.ico
war/src/main/webapp/images/16x16/blue.gif
war/src/main/webapp/images/16x16/blue.png
war/src/main/webapp/images/16x16/grey.gif
war/src/main/webapp/images/16x16/grey.png
war/src/main/webapp/images/16x16/red.gif
war/src/main/webapp/images/16x16/red.png
war/src/main/webapp/images/16x16/yellow.gif
war/src/main/webapp/images/16x16/yellow.png
war/src/main/webapp/images/24x24/folder-delete.gif
war/src/main/webapp/images/24x24/folder-delete.png
# Script in python to replace string Jenkins to Build Server in *.properties
#!/usr/bin/env python
import sys
import os
import shutil
import re
def edit_properties():
output_file = '/tmp/temp.properties'
if os.path.exists(output_file):
os.remove(output_file)
temp = open(output_file,'w')
input_file = sys.argv[1]
original = open(input_file, 'r')
lines = original.readlines()
for line in lines:
new_line = line
if not line.startswith('#'):
try:
value = re.search('=.*', line).group(0)
split = line.split(value)
if len(split) > 0:
key = split[0]
new_line = '%s%s\n' % (key, value.replace('jenkins', 'Build Server').replace('Jenkins', 'Build Server'))
new_line = new_line.replace('http://Build Server-ci.org', 'http://jenkins-ci.org')
new_line = new_line.replace('http://wiki.Build Server-ci.org', 'http://wiki.jenkins-ci.org')
except:
pass
temp.write(new_line)
temp.close()
original.close()
shutil.copy(output_file, input_file)
if __name__ == "__main__":
edit_properties()
@Manu-pocs
Copy link

Hi,
This will work for single properties file right? Each time we need to pass filename.properties as argument?

Please confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment