Svetoslav Angelov
Svetoslav Angelov

Reputation: 707

Your Jenkins workspace is almost full

Jenkins has 12 different workspaces which take around 25gb.I think the problem is because in every workspace there is a copy from GIT repository which is 3gb.

Does anybody know why Jenkins is using different workspaces and why on every workspace Jenkins has a copy from the git repo ?

Probably not of the workspaces are in used. Is there a way to check which of them can be deleted ?

Upvotes: 0

Views: 306

Answers (2)

yorammi
yorammi

Reputation: 6458

Jenkins is not creating a new folder for each build by default unless running in parallel, but if you have 12 different jobs, it creates at least one folder for each job.

Anyway, you can delete a workspace at the start and delete it also by the end of the build (better do it only if build went ok since if it fails you may want to see the content of the folder for debugging needs).

Also, for each job, you can set the number of builds to keep or the number of days to keep, so this can reduce the number of builds.

Upvotes: 0

Sebastian Lenartowicz
Sebastian Lenartowicz

Reputation: 4874

Two questions, two answers:

  1. For every build run in parallel, Jenkins will create a new workspace by default. 12 parallel builds = 12 workspaces. You can set it to share a workspace between multiple builds if you want, though how to do that is outside the scope of this answer because it's heavily dependent on your setup.
  2. As long as there's not a build currently running, you can delete the workspace directory freely. Or you can just modify your build to have Jenkins do that for you. Jenkins will always create a new directory if it needs to.

Upvotes: 1

Related Questions