onnxruntime/tools/ci_build/github/azure-pipelines/templates/explicitly-defined-final-tasks.yml
Yi Zhang ca315b9148
Use ADO cache to cache docker image instead of ACR (#14496)
### Description
Now, we only enable image cache in pipeline cache for Linux Aten
Pipeline.
It'll be enabled in other Linux pipelines gradually.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

Fixed
[AB#13143](https://aiinfra.visualstudio.com/6a833879-cd9b-44a4-a9de-adc2d818f13c/_workitems/edit/13143)


### Verification
1. No Image Cache in Pipeline

https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=904531&view=results
2. Use Cached Image in Pipeline

https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=904533&view=results
2023-03-11 10:32:02 +08:00

22 lines
778 B
YAML

# It's used to replace clean-agent-build-directory-step.yml
# mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3 should be
# set as the first step of the job in case there's conflict with other task which
# defines Post-Job.
steps:
- task: PublishTestResults@2
displayName: 'Publish unit test results'
inputs:
testResultsFiles: '**/*.results.xml'
searchFolder: '$(Build.BinariesDirectory)'
testRunTitle: 'Unit Test Run'
condition: succeededOrFailed()
- template: component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'
- script: docker system df && docker system prune -a -f && docker system df
displayName: Clean docker images
condition: eq(variables['Agent.OS'], 'Linux')
continueOnError: true