mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
35 lines
1,009 B
YAML
35 lines
1,009 B
YAML
parameters:
|
|
- name: DryRun
|
|
type: boolean
|
|
default: false
|
|
displayName: "Whether to do a dry-run and not actually clean up the cache."
|
|
- name: CacheLifetimeDays
|
|
type: number
|
|
default: 7
|
|
displayName: "The lifetime of an unused image in the cache, in days."
|
|
|
|
variables:
|
|
${{ if eq(parameters.DryRun, true) }}:
|
|
DryRunArgument: "--dry-run"
|
|
|
|
jobs:
|
|
- job: Clean_Build_Docker_Image_Cache
|
|
|
|
pool:
|
|
vmImage: 'ubuntu-18.04'
|
|
|
|
timeoutInMinutes: 10
|
|
|
|
steps:
|
|
- task: AzureCLI@2
|
|
inputs:
|
|
azureSubscription: 'AIInfraBuild'
|
|
scriptType: 'bash'
|
|
scriptLocation: 'inlineScript'
|
|
inlineScript: |
|
|
tools/ci_build/clean_docker_image_cache.py \
|
|
${{ variables.DryRunArgument }} \
|
|
--container-registry $(buildcache-container-registry) \
|
|
--log-storage-account $(buildcache-log-storage-account) \
|
|
--log-storage-account-container $(buildcache-log-storage-account-container) \
|
|
--cache-lifetime-days ${{ parameters.CacheLifetimeDays }}
|