Update build directory clean up stage for python package pipeline (#19553)

Fix to make clean up stage take effect.

If the `SourceFolder ` is empty, the task deletes files from the root
folder of the repository as though
[$(Build.SourcesDirectory)](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables)
was specified.
This commit is contained in:
PeixuanZuo 2024-02-20 10:31:39 +08:00 committed by GitHub
parent b55260d076
commit f3e3b531fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,10 +5,12 @@ parameters:
default: 'succeeded' # could be 'ci_only', 'always', 'succeeded'
steps:
- ${{ if eq(variables['System.TeamProject'], 'Lotus') }}:
- ${{ if eq(variables['System.TeamProject'], 'Lotus') }}:
- task: DeleteFiles@1
inputs:
contents: $(Build.BinariesDirectory)/*
SourceFolder: '$(Build.BinariesDirectory)'
contents: |
**/*
displayName: 'Clean up build directory'
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0