Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change workspace and build record Root Directory on Jenkins?

I would like Jenkins' data to be written to drive "E:" since this is the large drive on the server. Jenkins itself is installed on "C:".

How do I do that?

The default configuration that I saw is:

Workspace Root Directory: ${ITEM_ROOTDIR}/workspace
Build Record Root Directory: ${ITEM_ROOTDIR}/builds

Will the following changes help me achieve what I need?

Workspace Root Directory: E:/Jenkins/workspace
Build Record Root Directory: E:/Jenkins/builds/${ITEM_FULL_NAME}

In addition, what does "${ITEM_FULL_NAME}" mean?

like image 811
Yaniv Ofer Avatar asked Jan 18 '16 12:01

Yaniv Ofer


People also ask

How do I use different workspaces in Jenkins?

Suppose your "development" Jenkins job workspace is /var/workspace/job1 . In the "code analysis" job configuration page, under the tab General click on Advanced... and select the option Use custom workspace and give the same workspace /var/workspace/job1 as of your "development" job.

How do I add a workspace in Jenkins?

1) In "Manage Jenkins"->"Configure System" find new "Workspace Sharing" block. 2) Add some Name + SCM Repo URL pairs. Save. 3) Go to the job configuration page, now you able to select "Shared Workspace" here.


2 Answers

I figured it out. In order to save your Jenkins data on other drive you'll need to do the following:

Workspace Root Directory: E:\Jenkins\${ITEM_FULL_NAME}\workspace
Build Record Root Directory: E:\Jenkins\${ITEM_FULL_NAME}\builds

Change Directory

like image 192
Yaniv Ofer Avatar answered Oct 05 '22 19:10

Yaniv Ofer


You can modify the path on the config.xml file in the default directory

<projectNamingStrategy class="jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"/> <workspaceDir>D:/Workspace/${ITEM_FULL_NAME}</workspaceDir> <buildsDir>D:/Logs/${ITEM_ROOTDIR}/Build</buildsDir> 
like image 32
adil ameen Avatar answered Oct 05 '22 21:10

adil ameen