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

[devops] Clean previously downloaded artifacts. #21483

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions tools/devops/automation/templates/tests/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ steps:

# use a diff step depending if we have been trigger by a pipeline of by a PR/Commit
- ${{ if or(contains(variables['Build.Reason'], 'ResourceTrigger'), contains(variables['Build.Reason'], 'BuildCompletion'), contains(variables['Build.DefinitionName'], 'xamarin-macios-ci-tests'), contains(variables['Build.DefinitionName'], 'xamarin-macios-pr-tests')) }}:
- bash: |
ls -la "$PIPELINE_WORKSPACE/macios" || true
rm -Rf "$PIPELINE_WORKSPACE/macios"
displayName: "Remove previously downloaded artifacts"
condition: always()

- download: macios
displayName: Download WorkloadRollback.json
artifact: WorkloadRollback
Expand All @@ -168,8 +174,8 @@ steps:
artifact: package-test-libraries

- pwsh: |
Get-ChildItem -Path "$(Pipeline.Workspace)/macios" -Recurse -Force
displayName: 'Display downloads'
Get-ChildItem -Path "$(Pipeline.Workspace)/macios" -Recurse -Force | Format-Table -AutoSize | Out-String -Width 1000
displayName: 'List downloaded macios artifacts'
timeoutInMinutes: 5

# the default location when downloading is $(Pipeline.Workspace)/<pipeline resource identifier>/<artifact name>
Expand Down Expand Up @@ -204,8 +210,8 @@ steps:

# print the downloads to make our life easier on debug
- pwsh: |
Get-ChildItem -Path $(Build.SourcesDirectory)/artifacts -Recurse -Force
displayName: 'Display downloads'
Get-ChildItem -Path $(Build.SourcesDirectory)/artifacts -Recurse -Force | Format-Table -AutoSize | Out-String -Width 1000
displayName: 'List downloaded artifacts'
timeoutInMinutes: 5

- bash: |
Expand Down
Loading