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

ash pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow-ci-infra.git


The following commit(s) were added to refs/heads/master by this push:
     new eb0e14d  Remove left-over docker containers before fixing permissions 
(#5)
eb0e14d is described below

commit eb0e14d18790c4795e89653ce096c0a4168208ff
Author: Ash Berlin-Taylor <[email protected]>
AuthorDate: Mon Mar 1 11:10:58 2021 +0000

    Remove left-over docker containers before fixing permissions (#5)
    
    If the docker container is still running and creating files (as might be
    the case for the prod image builds) then some files could be left
    uncleaned, causing the next job to fail.
---
 cloud-init.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cloud-init.yml b/cloud-init.yml
index 778c8d3..7005f54 100644
--- a/cloud-init.yml
+++ b/cloud-init.yml
@@ -120,6 +120,9 @@ write_files:
   - path: /usr/local/sbin/runner-cleanup-workdir.sh
     content: |
       #!/bin/bash
+      echo "Left-over containers:"
+      docker ps -a
+      docker ps -qa | xargs --verbose --no-run-if-empty docker rm -fv
 
       if [[ -d ~runner/actions-runner/_work/airflow/airflow ]]; then
         cd ~runner/actions-runner/_work/airflow/airflow
@@ -133,7 +136,6 @@ write_files:
             git clean -fxd \
           "
         fi
-        docker ps -qa | xargs --no-run-if-empty docker rm -fv
       fi
     owner: root:root
     permissions: '0775'

Reply via email to