sonic-buildimage/.azure-pipelines/dpkg-cache-cleanup.yml
Liu Shilong 459ba257a4
[ci] Add job to cleanup nfs in armhf and arm64 agents. (#16270)
Why I did it
Clean old cached file in nfs disk for armhf/arm64

Work item tracking
Microsoft ADO (number only): 24930879
2023-08-29 19:14:45 +08:00

49 lines
1012 B
YAML

# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
# Clean up the cache 30 days ago
schedules:
- cron: "0 0 * * *"
branches:
include:
- master
always: true
trigger: none
pr: none
jobs:
- job: Amd
pool: sonicbld
timeoutInMinutes: 5
steps:
- checkout: none
- script: |
df -h
sudo find /nfs/dpkg_cache/ -name *.tgz -mtime +30 -type f -delete
df -h
displayName: clean dpkg cache
- job: Armhf
pool: sonicbld-armhf
timeoutInMinutes: 5
steps:
- checkout: none
- script: |
df -h
sudo find /nfs/dpkg_cache/ -name *.tgz -mtime +30 -type f -delete
df -h
displayName: clean dpkg cache
- job: Arm64
pool: sonicbld-arm64
timeoutInMinutes: 5
steps:
- checkout: none
- script: |
df -h
sudo find /nfs/dpkg_cache/ -name *.tgz -mtime +30 -type f -delete
df -h
displayName: clean dpkg cache