Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up more disk space #1747

Merged
merged 14 commits into from
Jul 22, 2023
23 changes: 21 additions & 2 deletions conda_smithy/templates/azure-pipelines-linux.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,30 @@ jobs:
- checkout: self
fetchDepth: {{ clone_depth }}
{%- endif %}
{%- if azure.free_disk_space %}
- script: |
rm -rf /opt/ghc
bkpoon marked this conversation as resolved.
Show resolved Hide resolved
sudo mkdir -p /opt/empty_dir || true
for d in \
/opt/ghc \
/opt/hostedtoolcache \
/usr/lib/jvm \
/usr/local/.ghcup \
/usr/local/android \
/usr/local/powershell \
/usr/share/dotnet \
/usr/share/swift \
bkpoon marked this conversation as resolved.
Show resolved Hide resolved
; do
sudo rsync --stats -a --delete /opt/empty_dir/ $d || true
done
sudo aptitude purge -y -f firefox \
google-chrome-stable \
microsoft-edge-stable
sudo apt-get autoremove -y >& /dev/null
sudo apt-get autoclean -y >& /dev/null
sudo docker image prune --all --force
df -h
displayName: Manage disk space

{%- endif %}
# configure qemu binfmt-misc running. This allows us to run docker containers
# embedded qemu-static
- script: |
Expand Down
23 changes: 23 additions & 0 deletions news/clean_disk.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* Free up more space on the default linux image on Azure Pipelines

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
4 changes: 2 additions & 2 deletions tests/test_configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ def test_upload_on_branch_azure(upload_on_branch_recipe, jinja_env):
content_lin = yaml.safe_load(fp)
assert (
'UPLOAD_ON_BRANCH="foo-branch"'
in content_lin["jobs"][0]["steps"][2]["script"]
in content_lin["jobs"][0]["steps"][1]["script"]
)
assert (
"BUILD_SOURCEBRANCHNAME"
in content_lin["jobs"][0]["steps"][2]["script"]
in content_lin["jobs"][0]["steps"][1]["script"]
)


Expand Down