Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-generated build folder too long on jenkins slave

Tags:

jenkins

I have Jenkins set up to run builds on a windows slave.

In an older version of Jenkins (2.7 to be exact), the builds ran fine under

C:\jenkins\workspace\<repository name>\<project name>\<stage>

However when we upgraded (now using 2.19.3), the builds are now under

C:\jenkins\workspace\<a concatenation of repository, project, stage and a *very* long alphanumeric string>

This causes problems in my build as filepaths are becoming too long to handle and various steps are breaking. In fact, even the default folder name is so long that the beginning of the name is being truncated.

There are Linux agents under this Jenkins master so I cannot do a blanket workspace change on all agents.

How can I proceed? Is it possible to change this default folder name to something shorter?

like image 684
Nernie Avatar asked Dec 01 '16 23:12

Nernie


People also ask

How do I fix Jenkins disk space is too low?

Make sure you understand what is the disk output of your build - if possible - restrict the output to happen only to the job workspace. Use workspace cleanup plugin to cleanup the workspace as post build step. If the process must write some data to external folders - clean them up manually on post build steps.


1 Answers

So far, our solution has been a rather hacky one:

We simply mapped the long base folder to a network drive (specifically:

subst x: .
x:

and then continued on from there.

like image 63
Nernie Avatar answered Oct 19 '22 14:10

Nernie