From f3d3b1a9ad430d6e93998286807604c3d396ab0f Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 14 Mar 2014 09:00:19 +0000 Subject: Run apt-get clean when suitable, to reduce disk use --- jenkinstool | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jenkinstool b/jenkinstool index 9f321c8..210cfba 100755 --- a/jenkinstool +++ b/jenkinstool @@ -462,6 +462,7 @@ sudo apt-get update || true sudo apt-get --no-remove --allow-unauthenticated -y upgrade || \ sudo apt-get -y -f install sudo apt-get --no-remove --allow-unauthenticated -y upgrade +sudo apt-get clean cat << EOF > /var/lib/jenkins/.dput.cf [jenkins] @@ -494,7 +495,8 @@ missing="$(dpkg-checkbuilddeps 2>&1 | sed 's/([^)]*)//g' | tr -s ' ' '\n')" case "$missing" in - ?*) sudo apt-get install --no-remove --allow-unauthenticated -y $missing ;; + ?*) sudo apt-get install --no-remove --allow-unauthenticated -y $missing ; + sudo apt-get clean ;; esac ''') jc.add_ssh_command('\n'.join(project['build-commands'])) -- cgit v1.2.1