summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-02-24 21:41:38 +0000
committerGerrit Code Review <review@openstack.org>2017-02-24 21:41:38 +0000
commit66e9c2a346c5d96248399e0a04ede07f0cc2ff01 (patch)
tree6c98fbc79b8994b36b8fd284051b6a2608efca28
parent0ea39999dc8b7789815a295ca4dbc3b37036a805 (diff)
parent28b908abfc09aabc4c3cc2dd48152c5b8d2bb0d3 (diff)
Merge "Add option to diff containers after config stage."
-rwxr-xr-xdocker/docker-puppet.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py
index 1bb8bc2b..86c8ec98 100755
--- a/docker/docker-puppet.py
+++ b/docker/docker-puppet.py
@@ -46,6 +46,15 @@ def pull_image(name):
def rm_container(name):
+ if os.environ.get('SHOW_DIFF', None):
+ print('Diffing container: %s' % name)
+ subproc = subprocess.Popen(['/usr/bin/docker', 'diff', name],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ cmd_stdout, cmd_stderr = subproc.communicate()
+ print(cmd_stdout)
+ print(cmd_stderr)
+
print('Removing container: %s' % name)
subproc = subprocess.Popen(['/usr/bin/docker', 'rm', name],
stdout=subprocess.PIPE,