Change Jenkins Timezone

To see what time zone your jenkins is uning, in your browser navigate to:

 

http://servername:port/systemInfo

 

To change the jenkins timezone, in the Jenkins base directory, edit jenkins.xml

change this line:

<arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar “%BASE%\jenkins.war” –httpPort=8080</arguments>

to this:

<arguments>-Xrs -Xmx256m -Duser.timezone=”Europe/London” -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar “%BASE%\jenkins.war” –httpPort=8080</arguments>

Restart that bad boy.

Advertisements

A Word on Jenkins

I recently had difficulty getting jenkins configured on Windows 7.

Some things to keep in mind:

  • Although you may be logged in to the machine as Administrator, Jenkins probably isnt therefore make sure to have all environment variables included on the path for all users. If you dont do this, some of the tasks in the build may fail and give ambigious output.
  • Restarting Jenkins is done from hitting the following URL http://yourIPaddress:PORT/safeRestart
  • In the job, go to the configuration screen. APP.DIR is the absolute path to he directory, APP.BASE is the path from the folder of your app.
  • If you force the closing / ending of the Jenkins java process to forcefully kill it, you can restart by typing ‘Services’ in the start menu, locating Jenkins, right click and start.
  • Jenkins build will fail as soon as a task fails. For me, the last task was to start Chrome and this was failing. The solution was to uninstall one of the installations of chrome (not the one that Jenkins was looking for!)