Skip to content

Commit

Permalink
Update build directory clean up stage for python package pipeline (#1…
Browse files Browse the repository at this point in the history
…9553)

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.
  • Loading branch information
PeixuanZuo authored Feb 20, 2024
1 parent b55260d commit f3e3b53
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f3e3b53

Please sign in to comment.