mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-06 00:03:22 +00:00
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
parameters:
|
|
- name: DryRun
|
|
type: boolean
|
|
default: false
|
|
displayName: "Do a dry-run and do not remove any images"
|
|
- name: CacheHistoryDays
|
|
type: number
|
|
default: 4
|
|
displayName: "The length of the cache history in days"
|
|
- name: CacheMinAccessCount
|
|
type: number
|
|
default: 5
|
|
displayName: "The minimum access count over the cache history"
|
|
|
|
variables:
|
|
${{ if eq(parameters.DryRun, true) }}:
|
|
DryRunArgument: "--dry-run"
|
|
|
|
jobs:
|
|
- job: Clean_Build_Docker_Image_Cache
|
|
|
|
pool: onnxruntime-Ubuntu2204-AMD-CPU
|
|
|
|
timeoutInMinutes: 30
|
|
|
|
steps:
|
|
- checkout: self
|
|
submodules: false
|
|
fetchDepth: 1
|
|
|
|
- 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-history-days ${{ parameters.CacheHistoryDays }} \
|
|
--cache-min-access-count ${{ parameters.CacheMinAccessCount }}
|
|
displayName: "Clean image cache"
|