summaryrefslogtreecommitdiff
path: root/deploy_a_system.sh
diff options
context:
space:
mode:
authorPatrick Darley <patrick.darley@codethink.co.uk>2015-09-18 11:05:41 +0000
committerPatrick Darley <patrick.darley@codethink.co.uk>2015-09-18 11:06:05 +0000
commitb91d823e814c2cfdcc083161612e4ee24edf72f1 (patch)
treec9f66727d26e3197783a40e5b436dc806ed0475b /deploy_a_system.sh
parentb1381bfe415b5202b860088e67844d1da2ef332b (diff)
downloadbuildslave-scripts-b91d823e814c2cfdcc083161612e4ee24edf72f1.tar.gz
This should clear up any gigantic fartifacts that will fill up /src (or equivalents) super fast
Diffstat (limited to 'deploy_a_system.sh')
-rwxr-xr-xdeploy_a_system.sh19
1 files changed, 7 insertions, 12 deletions
diff --git a/deploy_a_system.sh b/deploy_a_system.sh
index bfc69a6..3a16d07 100755
--- a/deploy_a_system.sh
+++ b/deploy_a_system.sh
@@ -7,6 +7,7 @@ set -ex
cluster_name="$1"
definitions_dir=$(pwd)/definitions
ybd_dir=$(pwd)/ybd
+ybd_base=/src
# Can only deploy with a single instance of ybd. Crashes
# with >1
@@ -24,18 +25,12 @@ cd "$definitions_dir"
sudo "$ybd_dir"/ybd.py clusters/"$cluster_name"
-# Remove built system artifacts, tar and .unpacked
+# Hmm, remove built system artifacts, tar and .unpacked
# They are bloat and not needed after the deploy As they have
-# the image is made and has been archived. Future systems are
-# to be different as that is the whole point.
+# the image is made and has been archived.
-# remove .morph clustername
-cluster=$cluster_name
-
-# Search for the dir that has this name in /src/artifacts/^^^
-
-# Use this to remove the dir that contains the artifacts
-
-
-#sudo rm -r
+# get the system name
+s_n=`awk '/morph:/ {print $3}' "$cluster_name" | cut -d'/' -f2 | cut -d'.' -f1`
+# Remove the artifacts
+sudo rm -rf "$ybd_base"/artifacts/"$s_n".*