This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 9b37af1  Remove the unused (non-dangling) docker images in Jenkins and 
in deb+rpm packaing scripts
9b37af1 is described below

commit 9b37af1398b55c183d830c8a4c10e0c2f33b43d3
Author: Yifan Cai <[email protected]>
AuthorDate: Wed Feb 3 14:22:01 2021 -0800

    Remove the unused (non-dangling) docker images in Jenkins and in deb+rpm 
packaing scripts
    
     patch by Yifan Cai; reviewed by Mick Semb Wever for CASSANDRA-16419
---
 build-scripts/cassandra-deb-packaging.sh  |  2 +-
 build-scripts/cassandra-rpm-packaging.sh  |  2 +-
 jenkins-dsl/cassandra_job_dsl_seed.groovy | 16 ++++++++--------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/build-scripts/cassandra-deb-packaging.sh 
b/build-scripts/cassandra-deb-packaging.sh
index be401c6..c62d6fa 100755
--- a/build-scripts/cassandra-deb-packaging.sh
+++ b/build-scripts/cassandra-deb-packaging.sh
@@ -30,7 +30,7 @@ command -v docker >/dev/null 2>&1 || { echo >&2 "docker needs 
to be installed";
 [ -f "${cassandra_builds_dir}/docker/build-debs.sh" ] || { echo >&2 
"docker/build-debs.sh must exist"; exit 1; }
 
 # remove any previous older built images
-docker image prune -f --filter label=org.cassandra.buildenv=buster --filter 
"until=4h"
+docker image prune --all --force --filter label=org.cassandra.buildenv=buster 
--filter "until=4h"
 
 pushd $cassandra_builds_dir
 
diff --git a/build-scripts/cassandra-rpm-packaging.sh 
b/build-scripts/cassandra-rpm-packaging.sh
index e319b51..54da42f 100755
--- a/build-scripts/cassandra-rpm-packaging.sh
+++ b/build-scripts/cassandra-rpm-packaging.sh
@@ -30,7 +30,7 @@ command -v docker >/dev/null 2>&1 || { echo >&2 "docker needs 
to be installed";
 [ -f "${cassandra_builds_dir}/docker/build-rpms.sh" ] || { echo >&2 
"docker/build-rpms.sh must exist"; exit 1; }
 
 # remove any previous older built images
-docker image prune -f --filter label=org.cassandra.buildenv=centos --filter 
"until=4h"
+docker image prune --all --force --filter label=org.cassandra.buildenv=centos 
--filter "until=4h"
 
 pushd $cassandra_builds_dir
 
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy 
b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index 00eec93..f2dfcf9 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -174,7 +174,7 @@ matrixJob('Cassandra-template-artifacts') {
         postBuildTask {
             task('.', """
                 echo "Cleaning project…"; git clean -xdff ;
-                echo "Pruning docker…" ; docker system prune -f --filter 
"until=${maxJobHours}h"  ;
+                echo "Pruning docker…" ; docker system prune --all --force 
--filter "until=${maxJobHours}h"  ;
                 echo "Reporting disk usage…"; df -h ;
                 echo "Cleaning tmp…";
                 find . -type d -name tmp -delete 2>/dev/null ;
@@ -263,7 +263,7 @@ matrixJob('Cassandra-template-test') {
             task('.', """
                 echo "Finding job process orphans…"; if pgrep -af 
"\${JOB_BASE_NAME}"; then pkill -9 -f "\${JOB_BASE_NAME}"; fi;
                 echo "Cleaning project…"; git clean -xdff ;
-                echo "Pruning docker…" ; docker system prune -f --filter 
"until=${maxJobHours}h"  ;
+                echo "Pruning docker…" ; docker system prune --all --force 
--filter "until=${maxJobHours}h"  ;
                 echo "Reporting disk usage…"; du -xm / 2>/dev/null | sort -rn 
| head -n 30 ; df -h ;
                 echo "Cleaning tmp…";
                 find . -type d -name tmp -delete 2>/dev/null ;
@@ -349,7 +349,7 @@ matrixJob('Cassandra-template-dtest-matrix') {
             // the pgrep needs to catch any other build/process that is using 
docker
             task('.', """
                 echo "Cleaning project…"; git clean -xdff ;
-                echo "Pruning docker…" ; if pgrep -af 
"cassandra-artifacts.sh|jenkinscommand.sh"; then docker system prune -f 
--filter 'until=${maxJobHours}h'; else docker system prune -f --volumes ; fi;
+                echo "Pruning docker…" ; if pgrep -af 
"cassandra-artifacts.sh|jenkinscommand.sh"; then docker system prune --all 
--force --filter 'until=${maxJobHours}h'; else docker system prune --all 
--force --volumes ; fi;
                 echo "Reporting disk usage…"; df -h ;
                 echo "Cleaning tmp…";
                 find . -type d -name tmp -delete 2>/dev/null ;
@@ -443,7 +443,7 @@ matrixJob('Cassandra-template-cqlsh-tests') {
             task('.', """
                 echo "Finding job process orphans…"; if pgrep -af 
"\${JOB_BASE_NAME}"; then pkill -9 -f "\${JOB_BASE_NAME}"; fi;
                 echo "Cleaning project…"; git clean -xdff ;
-                echo "Pruning docker…" ; docker system prune -f --filter 
"until=${maxJobHours}h"  ;
+                echo "Pruning docker…" ; docker system prune --all --force 
--filter "until=${maxJobHours}h"  ;
                 echo "Reporting disk usage…"; df -h ;
                 echo "Cleaning tmp…";
                 find . -type d -name tmp -delete 2>/dev/null ;
@@ -707,7 +707,7 @@ matrixJob('Cassandra-devbranch-artifacts') {
         postBuildTask {
             task('.', """
                 echo "Cleaning project…"; git clean -xdff ;
-                echo "Pruning docker…" ; docker system prune -f --filter 
"until=${maxJobHours}h"  ;
+                echo "Pruning docker…" ; docker system prune --all --force 
--filter "until=${maxJobHours}h"  ;
                 echo "Reporting disk usage…"; df -h ;
                 echo "Cleaning tmp…";
                 find . -type d -name tmp -delete 2>/dev/null ;
@@ -808,7 +808,7 @@ testTargets.each {
                 task('.', """
                     echo "Finding job process orphans…"; if pgrep -af 
"\${JOB_BASE_NAME}"; then pkill -9 -f "\${JOB_BASE_NAME}"; fi;
                     echo "Cleaning project…"; git clean -xdff ;
-                    echo "Pruning docker…" ; docker system prune -f --filter 
"until=${maxJobHours}h"  ;
+                    echo "Pruning docker…" ; docker system prune --all --force 
--filter "until=${maxJobHours}h"  ;
                     echo "Reporting disk usage…"; du -xm / 2>/dev/null | sort 
-rn | head -n 30 ; df -h ;
                     echo "Cleaning tmp…";
                     find . -type d -name tmp -delete 2>/dev/null ;
@@ -923,7 +923,7 @@ dtestTargets.each {
                 // the pgrep needs to catch any other build/process that is 
using docker
                 task('.', """
                     echo "Cleaning project…" ; git clean -xdff ;
-                    echo "Pruning docker…" ; if pgrep -af 
"cassandra-artifacts.sh|jenkinscommand.sh"; then docker system prune -f 
--filter "until=${maxJobHours}h"; else docker system prune -f --volumes ; fi;
+                    echo "Pruning docker…" ; if pgrep -af 
"cassandra-artifacts.sh|jenkinscommand.sh"; then docker system prune --all 
--force --filter "until=${maxJobHours}h"; else docker system prune --all 
--force --volumes ; fi;
                     echo "Reporting disk usage…"; df -h ;
                     echo "Cleaning tmp…";
                     find . -type d -name tmp -delete 2>/dev/null ;
@@ -1021,7 +1021,7 @@ matrixJob('Cassandra-devbranch-cqlsh-tests') {
             task('.', """
                 echo "Finding job process orphans…"; if pgrep -af 
"\${JOB_BASE_NAME}"; then pkill -9 -f "\${JOB_BASE_NAME}"; fi;
                 echo "Cleaning project…"; git clean -xdff ;
-                echo "Pruning docker…" ; docker system prune -f --filter 
"until=${maxJobHours}h" ;
+                echo "Pruning docker…" ; docker system prune --all --force 
--filter "until=${maxJobHours}h" ;
                 echo "Reporting disk usage…"; df -h ;
                 echo "Cleaning tmp…";
                 find . -type d -name tmp -delete 2>/dev/null ;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to