Walid-Shouman
12/23/2014 - 6:43 AM

Customizing/using Jenkins

Customizing/using Jenkins

Restart jenkins

That's how we restart jenkins service.

sudo service jenkins restart

Jenkins defaults

Are stored in /etc/default/jenkins.
Example: the default port named HTTP_PORT.

Note: we need to restart after making changes:
Example

sudo nano /etc/default/jenkins
sudo service jenkins restart

Git timeout of a project

Follow project -> Configure -> Additional Behaviours (sections) -> add button -> advanced clone options -> insert the new timeout value

Change workspace directory

[Jenkins change workspaces and build][1] article.

[1] http://ingorichter.blogspot.com/2012/02/jenkins-change-workspaces-and-build.html

Default workspace

The default workspace is written in /etc/default/jenkins with the tag "JENKINS_HOME" mine was JENKINS_HOME=/var/lib/jenkins.

Change workspae

We can change the workspace per project through the "Advanced Project Options" section -> Use Custom Workspace option.

To change the WORKSPACE we'll need to ensure that jenkins is the owner of the workspace out of /var/lib/jenkins ... by chown to jenkins

sudo chown jenkins -R master_directory
sudo chown jenkins -R build_directory

GUI application execution

To execute any gui application we must ensure the $DISPLAY and $XAUTHORITY have the right variables and $XAUTHORITY's path is accessible by jenkins ... for me the $DISPLAY was ":0" ... and $XAUTHORITY was "/home/walid5/.Xauthority" ... which had the permission set to 600, I had to change it to 644 so that jenkins can access it