Mr. Boy
Mr. Boy

Reputation: 63720

How can I get DevOps build agent to wipe a pipeline's directory pre-build?

A DevOps pipeline I created chooses folder b:\DevOpsBuilds\_work\1 to perform the build. However it doesn't remove this folder each run.

Is there a way to force it to, so each build is completely from scratch?

When I create a new pipeline, there are no settings relating to cleaning:

enter image description here

Upvotes: 0

Views: 2463

Answers (1)

Leo Liu
Leo Liu

Reputation: 76700

How can I get DEvOps build agent to wipe a pipeline's directory pre-build?

If you want to delete the folder b:\DevOpsBuilds\_work\1 pre-build, I am afraid it is impossible to do it automated.

As workaround, you could use the Clean option on the Get Source tab, which could perform different kinds of cleaning of the working directory of your private agent before the build is run:

enter image description here

We could set the value to true to clean the working directory of your private agent. You could select the All build directories to clean all folder for the path b:\DevOpsBuilds\_work\1

You could check the document Clean the local repo on the agent for some more details.

Upvotes: 2

Related Questions