Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions generated/source-repo/azure/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,16 @@ steps:
# NEXUS_IO_CREDS_PSW: $(NEXUS_IO_CREDS_PSW)
COSIGN_SECRET_PASSWORD: $(COSIGN_SECRET_PASSWORD)
COSIGN_SECRET_KEY: $(COSIGN_SECRET_KEY)
- bash: |
echo "• cleanup agent storage"
echo "Disk usage before cleanup:"
df -h
echo "Cleaning directory: $(Agent.WorkFolder)"
cd $(Agent.HomeDirectory)
rm -rf $(Agent.WorkFolder)/*
echo "Running Docker prune targeting images older than 12h"
docker system prune -af --filter "until=12h"
echo "Disk usage after cleanup:"
df -h
name: cleanup
condition: always()
13 changes: 13 additions & 0 deletions samples/skeleton/ci/source-repo/azure/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,16 @@ steps:
# NEXUS_IO_CREDS_PSW: $(NEXUS_IO_CREDS_PSW)
COSIGN_SECRET_PASSWORD: $(COSIGN_SECRET_PASSWORD)
COSIGN_SECRET_KEY: $(COSIGN_SECRET_KEY)
- bash: |
echo "• cleanup agent storage"
echo "Disk usage before cleanup:"
df -h
echo "Cleaning directory: $(Agent.WorkFolder)"
cd $(Agent.HomeDirectory)
rm -rf $(Agent.WorkFolder)/*
echo "Running Docker prune targeting images older than 12h"
docker system prune -af --filter "until=12h"
echo "Disk usage after cleanup:"
df -h
name: cleanup
condition: always()
15 changes: 14 additions & 1 deletion templates/source-repo/azure-pipelines.yml.njk
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,17 @@ steps:
{%- for step in build_steps %}
{% include "azure-step.njk" %}
{%- endfor -%}
{%- endfilter -%}
{%- endfilter %}
- bash: |
echo "• cleanup agent storage"
echo "Disk usage before cleanup:"
df -h
echo "Cleaning directory: $(Agent.WorkFolder)"
cd $(Agent.HomeDirectory)
rm -rf $(Agent.WorkFolder)/*
echo "Running Docker prune targeting images older than 12h"
docker system prune -af --filter "until=12h"
echo "Disk usage after cleanup:"
df -h
name: cleanup
condition: always()