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

Post Clean Up ends up with error #3628

Closed
ghost opened this issue Feb 16, 2017 · 4 comments
Closed

Post Clean Up ends up with error #3628

ghost opened this issue Feb 16, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Feb 16, 2017

Trying to clean up the vnext agent working directory with the "Delete Files" task.

Source Folder: $(Agent.BuildDirectory)
Contents: *

when executing the build, it finishes as partialy succeeded with the following error message:

Error: Failed rmRF: rm: could not remove directory (code EBUSY): D:\Agent1\_work\13\s
Couldn't delete one or more files

looking into the agent directory, the "S" folder is still there, but empty.
I then tryed using inline poweshell with a 10 second wait pause, but the error still comes up.
any ideas how to post clean up the source folder?

@bryanmacfarlane bryanmacfarlane modified the milestone: TFS.vNext (onPrem) Mar 29, 2017
@ericsciple
Copy link
Contributor

@hqer2k9 i'm just guessing, but it could be the s folder itself if it's the working directory for the process doing the cleanup. One thing you could try is changing the pattern to $(Agent.BuildDirectory)/**/* and that pattern may avoid the root folder itself.

@ericsciple ericsciple self-assigned this Mar 31, 2017
@bryanmacfarlane
Copy link
Contributor

This can be achieved by setting the Build.Clean variable. See Q & A section. Let the agent do this for you.

https://www.visualstudio.com/en-us/docs/build/define/repository

@Mardoxx
Copy link

Mardoxx commented Jul 27, 2017

@bryanmacfarlane this only does it when initializing the job, not post job.

@Mardoxx
Copy link

Mardoxx commented Jul 27, 2017

I set the Build.Clean to all and it does nothing post job. It just clears the directories before pulling sources, not after everything has built successfully - which I would expect it to. Also see microsoft/azure-pipelines-agent#708

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

No branches or pull requests

4 participants