Friday, 1 February 2019

Jenkins workspace location && useful plugins

  1. Navigate to Jenkins -> Manage Jenkins -> Configure System
  2. Right at the top, under Home directory
By default, Jenkins stores all of its data in this directory on the file system.
There are a few ways to change the Jenkins home directory:
  • Edit the JENKINS_HOME variable in your Jenkins configuration file (e.g. /etc/sysconfig/jenkins on Red Hat Linux).
  • Use your web container's admin tool to set the JENKINS_HOME environment variable.
  • Set the environment variable JENKINS_HOME before launching your web container, or before launching Jenkins directly from the WAR file.
  • Set the JENKINS_HOME Java system property when launching your web container, or when launching Jenkins directly from the WAR file.
  • Modify web.xml in jenkins.war (or its expanded image in your web container). This is not recommended.
This value cannot be changed while Jenkins is running. 
It is shown here to help you ensure that your configuration is taking effect.

Default location in Home Directory is
# cd to workspace directory to see a list of workspaces you have created
$ cd /var/lib/jenkins/workspace/

Useful plugins Junit for unit test logs && webhook for hooking up git 
(usually installed as default, listed in plugins)

view these plugins for sample usage
sample command for running php unit test && log with junit
cd ./mygit-repo/
composer install
./vendor/bin/phpunit ./tests/Feature/test.php --log-junit ./tests/JunitResults/*.xml

Junit repo default directory is workspace root directory
which is  /var/lib/jenkins/workspace/your_current_workspace/


No comments:

Post a comment