Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify clean all build directories in yaml in Azure DevOps?

Tags:

azure-devops

According to https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&viewFallbackFrom=vsts&tabs=schema#checkout we can have this:

steps:
- checkout: self
  clean: true

But as far as I understand the documentation it only cleans the source tree, not all the build directories.

like image 676
mark Avatar asked Nov 20 '19 01:11

mark


1 Answers

Workspace clean is probably what you want. You can define a workspace schema under the job and choose the resources to clean up.

Check here for more information about workspace.

  - job: myJob
    workspace:
      clean: outputs | resources | all # what to clean up before the job runs
like image 138
Levi Lu-MSFT Avatar answered Oct 24 '22 23:10

Levi Lu-MSFT