Thursday, October 9, 2014

Run Jenkins with custom http port or JENKINS HOME

If you need to run Jenkins instance with alternative http port or you want to point custom directory to Jenkins to store job's files then this tip is for you.

To control http port the variable "httpPort" needs to be set. Pointing custom jobs directory can be achieved by setting JENKINS_HOME enviornment variable. This variable needs to be set before "-jar" parameter, so be carefull with order of the parameters.

After downloading jenkins.war from https://wiki.jenkins-ci.org, place it in desired directory, start command line and execute:
a) in Windows
java -DJENKINS_HOME="C:\test\jenkins_home" -jar "C:\test\jenkins.war" --httpPort=8081 
b) in Linux
java -DJENKINS_HOME="/test/jenkins_home" -jar "/test/jenkins.war" --httpPort=8081 

This works with latest Jenkins release and with LTS version as well.

Saturday, May 10, 2014

Hello World!

package pl.ljader.blog.helloworld;

public class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello World!");
  }
}

Content Disclaimer:
This is my personal website and reflects my views and opinions only. Any comments made on this website, by myself or by third parties, do not necessarily reflect views or opinions of my employer. The information provided in this blog is provided “as is” without warranty of any kind. Author will not compensate you in any way whatsoever if you ever happen to suffer a loss/damage because of or while making use of information in this blog.