Skip to content

Commit

Permalink
[devops] Clean previously downloaded artifacts.
Browse files Browse the repository at this point in the history
Also:

* Improve file listing by not wrapping output.
* Be a bit more descriptive in step display names.
  • Loading branch information
rolfbjarne committed Oct 21, 2024
1 parent c8300a1 commit 37a3315
Showing 1 changed file with 10 additions and 4 deletions.
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
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
displayName: 'List downloaded artifacts'
timeoutInMinutes: 5

- bash: |
Expand Down

5 comments on commit 37a3315

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.