onnxruntime/tools/ci_build/github/azure-pipelines/templates/explicitly-defined-final-tasks.yml
Changming Sun afd3e81c94
Remove PostBuildCleanup (#23233)
Remove PostBuildCleanup tasks since it is deprecated. It is to address a
warning in our pipelines:

"Task 'Post Build Cleanup' version 3 (PostBuildCleanup@3) is dependent
on a Node version (6) that is end-of-life. Contact the extension owner
for an updated version of the task. Task maintainers should review Node
upgrade guidance: https://aka.ms/node-runner-guidance"

Now the cleanup is controlled in another place:

https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/workspace?view=azure-pipelines


The code change was generated by the following Linux command:
```bash
find . -name \*.yml -exec sed -i '/PostBuildCleanup/,+2d' {} \;
```
2024-12-31 13:12:33 -08:00

19 lines
596 B
YAML

# It's used to replace clean-agent-build-directory-step.yml
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