Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-41805] Add deleteTmpDir option #36

Closed
wants to merge 2 commits into from
Closed

[JENKINS-41805] Add deleteTmpDir option #36

wants to merge 2 commits into from

Conversation

m4x1202
Copy link

@m4x1202 m4x1202 commented Mar 15, 2018

This would make it possible to also cleanup the @tmp directory of a workspace.
Default value is set to false to be backward compatible.

@pjanouse
Copy link
Contributor

pjanouse commented Oct 9, 2018

@jglick Although JENKINS-41805 looks a serious issue for me (unresolved yet), I don't think it is a fault of WS Cleanup plugin itself. It shouldn't remove an orphan besides ${env.WORKSPACE} directory.

Do we want to introduce this feature in WS Cleanup plugin or we rather fix the issue elsewhere?

It isn't only about ${env.WORKSPACE}@tmp location, but also ${env.WORKSPACE}@script and who can know what brings the future...

@AnEmortalKid
Copy link

Would an option for additional patterns added to ${env.WORKSPACE} be acceptable? Something like:

cleanWs(siblings: ["@tmp", "@script"]

@saraogivinay
Copy link

Anyone update on when this PR can be merged?

@olivergondza
Copy link
Member

I am sorry but this functionality does not belong to ws-cleanup plugin. Putting aside it is not a workspace, it is a utility directory created by some other plugin that should be responsible for cleaning it. As I have stated in the JIRA, removing the pipeline work-directories by this plugin while the pipeline is still in progress is brittle as hell.

I do understand this is impactfull and it causes a lot of pain, but this is not a way to improve that.

@jglick
Copy link
Member

jglick commented Dec 18, 2019

it is a utility directory created by some other plugin

@tmp is standard in Jenkins (see WorkspaceList).

@jakubgs
Copy link

jakubgs commented Jan 3, 2023

Indeed, the @tmp folder is part of standard Jenkins functionality, just check /env-vars.html:

WORKSPACE_TMP
A temporary directory near the workspace that will not be browsable and will not interfere with SCM checkouts. May not initially exist, so be sure to create the directory as needed (e.g., mkdir -p on Linux). Not defined when the regular workspace is a drive root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants