I am responsible for four different Jenkins installations - two test and two production servers.
What options do I have from within Jenkins to make it more obvious which machine I am connected to?
What I would like to do is be able to change the Jenkins text at the top of the screen to 'Jenkins Department 1 Test' - is this possible? Are there other options such as changing colours etc?
I think the simplest way to do this is with the Simple Theme Plugin.
A plugin for Jenkins that supports custom CSS & JavaScript.
You can make your own simple css and/or javascript, point to the file in the configuration and you're done. Or you can use existing css from the internet.
obsolete as of 2017
Try the Page Markup Plugin.
Adds custom HTML content to header & footer on all Hudson pages.
Use this plugin to add your own custom content (e.g. CSS, site headers, and site footers) to Hudson pages.
I haven't used this plugin myself, but you should be able to override the default CSS styles to insert your own header text or image.
Alternatively, you can edit the CSS / images yourself in JENKINS_HOME/war/css and JENKINS_HOME/war/images, but I don't recommend that since you'll probably lose any customizations when you upgrade.
Another possibility would be to use tools like Greasemonkey (Firefox) or a similar built in ability with in Chrome (http://www.chromium.org/developers/design-documents/user-scripts) to have JavaScript code alter the appearance of the page. You'd get a lot of flexibility and could potentially go so far as to prohibit certain commands from executing or enforce additional restrictions when executing certain commands on the production servers.
In addition to or instead of the Simple Theme Plugin proposed by #Illidanek, you might also try the jQuery Plugin.
This plugin is a library plugin for other plugins to share common jQuery. It also allows users to use jQuery on each view descriptions.
It doesn't completely match your requirements, but it might be useful to add jQuery snippets for special formatting/styling/html-manipulation in the Jenkins "System Message", in view descriptions or in job descriptions.
I personally often prefer the Simple Theme Plugin.
Related
I use Vaadin #JavaScript annotation to load JavaScript files for my application. It works great but I would need different JavaScript loaded for differents builds.
The idea is to have something like these:
#JavaScript("url.from.properties.or.pom")
So for DEV I would get #JavaScript("https://example.com/test/js/embed.js") and for PROD #JavaScript("https://example.com/production/js/embed.js"). The script url value should be taken from application.properties or pom.xml.
I cannot figure out how to do it. I use Vaadin 8 with Maven and Spring Boot. Thank you in advance.
There's no direct support for what you want to do, but I can come up with three different solutions that you could consider.
Register a DependencyFilter that dynamically rewrites the dependency URL from the annotation depending on the situation.
Create separate Java classes for each case (with all the actual functionality in a shared super class). You can then have either runtime logic or use e.g. different Spring configurations to choose exactly which class to use.
Remove the #JavaScript annotation and instead call JavaScript.eval from onAttach to somehow dynamically inject the script you want.
I am trying to incorporate pipeline into my project but I don't see my language on the list. My project is just HTML, CSS, and Javascript. Javascript is on the list but I think that choosing it will be overkill because I don't need node. Should I choose Other instead? Any advice? Thanks.
Those templates are only there to provide a starting point - they are not fixed requirements. The "Other" template is probably a good place for you to start.
I am currently thinking of writing an AutoFill plugin/widget which will take my personal data such as First Name, Last Name etc from a file/javascript and will automatically fill it in web page form.
I have read till now to build a plugin which works for all browsers, I have two options:-
1) To make a Jquery UI widget
2) To make a NPAPI plugin
Is there any other easier method to develop an autofilling plugin, and which option to take i.e. NPAPI plugin or Jquery widget ?
Thanks
Neither of the two options you mention will allow you to automatically fill in your personal data on all websites.
You'll want to write a browser extension (which are different from plugins). As you want to target multiple browsers, you may want to look into frameworks which make that easier, like crossrider.
Does Grails have any plugins with functionality similar to the django-debug-toolbar (djdt)?
See this screencast for an introduction to djdt.
Why yes it does grails debug-toolbar:
Grails Debug Toolbar is a plugin
inspired from Django Debug Toolbar
While it doesn't have all the features of djdt it is planned to expand the feature set in the future, here is relevant section from their webpage:
Future work
Currently the views of debugtoolbar
need to go in the grails-app/views of
the application. When you install the
plugin they are automatically copied
to your application grails-app/views.
Need to avoid this.
JavaScript and
static resources for the toolbar
reside in web-app/debugtoolbar. It is
also copied to your application
web-app/debugtoolbar. Need to avoid
this.
A way of ordering the panels in
the toolbar. Currently it is random
depending on how beans are found
during execution of tag.
More useful panels such as Timing the requests, SQL queries, logging etc
It not quite a toolbar (and not a plugin) but Spring Insight gives you detailled request timing right down to the JDBC level. It integrates pretty nicely with Spring Tool Suite from what I've seen.
Check out Peter's screencast: http://www.grails.org/blog/view/pledbrook/New+screencast%3A+Profiling+with+STS+%26+Spring+Insight
You need to deploy your app to Spring's tcServer rather than a plain tomcat which might be fine for development tuning.
cheers
Lee
When you start a new project (whether it's personal or professional) what do you have at hand to quickly start developing the project?
For example, when I start a new project at work, I have the following already setup from a custom sandbox:
Two different authentication classes, LDAP and CAS which I can change via app.yml
Custom form widgets which I use across most applications
Capistrano deployment script for deploying the project to staging or production servers.
A mail template class which uses an XML file for the templates to send emails
Mail server, ldap etc. settings all configured.
Bunch of icons and the same CSS (which with some exceptions is always the same for each project)
custom error pages, layouts, login layout etc.
static pages such as about, contact us etc.
Useful plugins such as sfFormExtraPlugin, twig etc.
jquery and jQuery UI libraries
Basic local ACL and translation model classes and some other default models.
Tasks - send email task and build translations.
custom tools class for doing some custom stuff
custom factories and some default routes
helpers which I will most probably use are enabled by default (i18n, partial etc.)
And some other things :-)
I'm just wondering what you do to make your development quicker and more efficient when starting a new project. Hopefully I'll learn some new things from what you do.
Thanks folks!
Great question and great list. Here's some more:
As a general practice, whenever we develop a feature that could be used across projects, we develop it as a plugin so it can be easily dropped into other projects.
Custom form formatter that uses our own widget/validators in place of the default Symfony ones.
Custom mailer with support for sending processing templates as emails and better HTML email support.
Plugin for minimizing/combining CSS and JS assets.
Symlink from web/sf to lib/vendor/symfony/data/web. Better than an alias in apache.
Custom admin generator templates.
Quick setup script that takes commandline options or read a config file to create full local dev env (init the project, setup a vhost, modify etc/hosts, import to svn, create svn externals for Symfony and key plugins like sfDoctrineGuard)
Custom Project skeleton
Custom Javascript helper based on Apostrophes new a_js_*() helper functions