summaryrefslogtreecommitdiff
path: root/tcwg-update-host-containers.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-06-24 11:06:45 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-06-24 11:29:05 +0000
commit82de5651cf9290ee14e3a2f62edaf63a2a0029c8 (patch)
treef12f293e9418538984ec4f418bb57ce8f485a49a /tcwg-update-host-containers.sh
parent1595a80921c100592176f58a1927394030e0220a (diff)
tcwg-update-host-containers.sh: New script
... to automate restarts of "host" and "jenkins" containers. Change-Id: Ia033674ccf256e8dbc3ac97bb7f5bb8f779084a4
Diffstat (limited to 'tcwg-update-host-containers.sh')
-rwxr-xr-xtcwg-update-host-containers.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/tcwg-update-host-containers.sh b/tcwg-update-host-containers.sh
new file mode 100755
index 00000000..fc614c08
--- /dev/null
+++ b/tcwg-update-host-containers.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -ef -o pipefail
+
+. $(dirname $0)/jenkins-helpers.sh
+convert_args_to_variables "$@"
+
+container="${container:-jenkins}"
+distro="${distro:-xenial}"
+verbose="${verbose:-true}"
+
+set -u
+
+if $verbose; then set -x; fi
+
+image="linaro/ci-$(print_arch_for_host localhost)-tcwg-host-ubuntu:$distro"
+docker pull "$image"
+
+docker run --rm $image start.sh > start.sh
+if docker inspect $container >/dev/null 2>&1; then
+ docker rm -vf $container
+fi
+
+group="all"
+if [ x"$container" = x"jenkins" ]; then
+ group="tcwg-infra"
+fi
+
+bash start.sh --task $container --verbose $verbose -- $image $group