Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins creating wrong folder for the new jobs that were copied from other existing jobs

Tags:

jenkins

Sorry, for the confusing title. I am totally new to Jenkins and have been handed over Jenkins to maintain which was set-up by someone else.

This is Jenkins Master slave config. I have 1 Master and 3 Slaves.

When I create a new job by "copying an existing" job, the new job works fine and no issues.

QUESTION: I see that in Jenkins workspace, this new job is creating a folder with the name of the original job that it was copied from. Why it is not creating a folder with the name of the new job instead?

Now, this is certainly not a show stopper for me, but it seems that Jenkins is creating a folder in workspace for each job that is run. And hence this particular folder is causing some confusion (although notional it is).

Hence, could you help me find out why the new job is creating a workspace folder with the name of original job it was copied from.

BTW, above issue was seen on the Jenkins slave.

like image 362
slayedbylucifer Avatar asked Oct 21 '22 08:10

slayedbylucifer


2 Answers

It can be solved by configuring the correct building workspace in jenkins job.

General > Advanced > custom workspace > "give your correct workspace"

like image 129
Anuj Rastogi Avatar answered Oct 25 '22 23:10

Anuj Rastogi


I had the same problem:

  • copied some jenkins project and wondered about hard coded workspace paths

Console output of the copied project. Job failed due to missing D: drive.

12:30:44 java.io.IOException: Failed to mkdirs: D:\TEAMS\WORKSPACE\RELEASE_1_1

The problem i had: the 'Advanced project options' were not expanded and the configure GUI had an enormous width, that i didn´t see the button to expand and show the 'advanced' settings.

In fact (thanks to sti): the original project had some hard coded workspace path.

like image 1
simon Avatar answered Oct 26 '22 00:10

simon