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

bharat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 491d69a  HDDS-3456. Fix Acceptance test failures due to disk out of 
space. (#844)
491d69a is described below

commit 491d69a164460ca2043851de84f4799e421dd522
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Mon Apr 20 22:27:30 2020 +0200

    HDDS-3456. Fix Acceptance test failures due to disk out of space. (#844)
---
 .github/workflows/post-commit.yml                            | 6 ++++++
 .github/workflows/pr.yml                                     | 6 ++++++
 hadoop-ozone/dist/src/main/compose/ozone-mr/hadoop31/test.sh | 6 ++++--
 hadoop-ozone/dist/src/main/compose/testlib.sh                | 7 +++++++
 4 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/post-commit.yml 
b/.github/workflows/post-commit.yml
index 1b9a446..daed5b0 100644
--- a/.github/workflows/post-commit.yml
+++ b/.github/workflows/post-commit.yml
@@ -104,10 +104,16 @@ jobs:
         - uses: ./.github/buildenv
           with:
             args: ./hadoop-ozone/dev-support/checks/build.sh
+        # remove image created for 'buildenv'
+        - run: docker image rm $(docker images -a -q | head -1) || true
+        # remove its big parent build image
+        - run: docker image rm apache/ozone-build || true
         - run: sudo pip install robotframework
         - run: sudo chown runner -R .
         - run: cd ./hadoop-ozone/dist/target/ozone-*/ && mkdir .aws && sudo 
chown 1000 .aws
         - run: ./hadoop-ozone/dev-support/checks/acceptance.sh
+          env:
+            KEEP_IMAGE: false
         - uses: actions/upload-artifact@master
           if: always()
           with:
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index e800e77..1f5ea3c 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -97,10 +97,16 @@ jobs:
         - uses: ./.github/buildenv
           with:
             args: ./hadoop-ozone/dev-support/checks/build.sh
+        # remove image created for 'buildenv'
+        - run: docker image rm $(docker images -a -q | head -1) || true
+        # remove its big parent build image
+        - run: docker image rm apache/ozone-build || true
         - run: sudo pip install robotframework
         - run: sudo chown runner -R .
         - run: cd ./hadoop-ozone/dist/target/ozone-*/ && mkdir .aws && sudo 
chown 1000 .aws
         - run: ./hadoop-ozone/dev-support/checks/acceptance.sh
+          env:
+            KEEP_IMAGE: false
         - uses: actions/upload-artifact@master
           if: always()
           with:
diff --git a/hadoop-ozone/dist/src/main/compose/ozone-mr/hadoop31/test.sh 
b/hadoop-ozone/dist/src/main/compose/ozone-mr/hadoop31/test.sh
index 457dd11..362ff98 100755
--- a/hadoop-ozone/dist/src/main/compose/ozone-mr/hadoop31/test.sh
+++ b/hadoop-ozone/dist/src/main/compose/ozone-mr/hadoop31/test.sh
@@ -19,6 +19,7 @@ COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" 
>/dev/null 2>&1 && pwd )"
 export COMPOSE_DIR
 
 # shellcheck source=/dev/null
+source "$COMPOSE_DIR/.env"
 source "$COMPOSE_DIR/../../testlib.sh"
 
 start_docker_env
@@ -35,9 +36,10 @@ source "$COMPOSE_DIR/../../testlib.sh"
 
 execute_robot_test rm ozonefs/hadoopo3fs.robot
 
-execute_robot_test rm  -v hadoop.version:3.1.2 mapreduce.robot
-
+execute_robot_test rm  -v "hadoop.version:${HADOOP_VERSION}" mapreduce.robot
 
 stop_docker_env
 
 generate_report
+
+cleanup_docker_images "${HADOOP_IMAGE}:${HADOOP_VERSION}"
diff --git a/hadoop-ozone/dist/src/main/compose/testlib.sh 
b/hadoop-ozone/dist/src/main/compose/testlib.sh
index a04b14c..ccda3b8 100755
--- a/hadoop-ozone/dist/src/main/compose/testlib.sh
+++ b/hadoop-ozone/dist/src/main/compose/testlib.sh
@@ -192,6 +192,13 @@ stop_docker_env(){
   fi
 }
 
+## @description  Removes the given docker images if configured not to keep 
them (via KEEP_IMAGE=false)
+cleanup_docker_images() {
+  if [[ "${KEEP_IMAGE:-true}" == false ]]; then
+    docker image rm "$@"
+  fi
+}
+
 ## @description  Generate robot framework reports based on the saved results.
 generate_report(){
 


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

Reply via email to