Merge "Add docker clean macro"
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Tue, 15 May 2018 14:42:37 +0000 (14:42 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Tue, 15 May 2018 14:42:37 +0000 (14:42 +0000)
docs/jjb/lf-macros.rst
jjb/lf-macros.yaml

index 724dad6..558aedd 100644 (file)
@@ -149,6 +149,11 @@ lf-rtd-verify
 
 ReadTheDocs verify script.
 
+lf-infra-provide-docker-cleanup
+-------------------------------
+
+Forcibly removes all of the docker images.
+
 Parameters
 ==========
 
index 11a827d..ef5cbd7 100644 (file)
     builder:
       - shell: !include-raw-escape: ../shell/sigul-install.sh
 
+- builder:
+    name: lf-infra-provide-docker-cleanup
+    builders:
+      - shell: |
+          #!/bin/bash
+          set +e  # DO NOT cause build failure if docker rmi fails
+          docker rmi -f $(docker images -a -q)
+          exit 0
+
+
 ##############
 # PARAMETERS #
 ##############