summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-02-17 15:03:27 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-02-17 15:03:27 +0000
commitb5b66cd86350665632e0e1dd75bd1736100f12d1 (patch)
treecdcd4a7c70112404fc22a03be62fd6ac90c21afe
parent702fddc4bccee17479c7e99dec14824aca676389 (diff)
downloadsystem-tests-b5b66cd86350665632e0e1dd75bd1736100f12d1.tar.gz
Add destroy_everything
-rwxr-xr-xdestroy_everything.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/destroy_everything.py b/destroy_everything.py
new file mode 100755
index 0000000..303a179
--- /dev/null
+++ b/destroy_everything.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+
+import subprocess
+
+def delete_repo(name):
+ output = subprocess.check_output(['ssh', 'git@ct-ri-4', 'destroy',
+ name], stderr=subprocess.STDOUT)
+
+ code = output.split()[-1]
+
+ subprocess.check_output(['ssh', 'git@ct-ri-4', 'destroy', name, code])
+
+
+l = subprocess.check_output(['ssh', 'git@ct-ri-4', 'ls']).strip().split('\n')
+names = [x.split()[1] for x in l]
+
+for repo in names:
+ delete_repo(repo) \ No newline at end of file