diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2020-05-13 10:44:45 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2020-05-13 14:53:33 +0000 |
commit | a3a66e895bbe44c9d6e40bb130b6b76530ab48bd (patch) | |
tree | d8451d3a8332c3cc0ec82eefdc572b78d68254e6 /tcwg-update-host-containers.sh | |
parent | 5478eca641d0f04e4789f2e5ea77b568b198be15 (diff) |
tcwg-update-*-containers.sh: Restart containers only on image update
Restart host, jenkins node and llvmbot containers only if underlying
docker image has changed. This allows us to simplify management of
persistent infrastructure containers (host, jenkins node and llvmbot
containers) by triggering update job, say, every day, instead of
monitoring dockerfiles.git repo for changes.
Change-Id: I27ecb27a9d1d4266d68e6fdfcdae98772fa7884d
Diffstat (limited to 'tcwg-update-host-containers.sh')
-rwxr-xr-x | tcwg-update-host-containers.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tcwg-update-host-containers.sh b/tcwg-update-host-containers.sh index c67e3673..13dd8f52 100755 --- a/tcwg-update-host-containers.sh +++ b/tcwg-update-host-containers.sh @@ -10,6 +10,7 @@ convert_args_to_variables "$@" distro="${distro-xenial}" node="${node-host}" group="${group-default}" +force="${force-false}" verbose="${verbose-true}" set -u @@ -25,10 +26,16 @@ if [ x"$group" = x"default" ]; then fi fi +if $force; then + keep_existing=false +else + keep_existing=keep_if_same_image +fi + $scripts/tcwg-start-container.sh \ --container "$node" \ --image "$image" \ - --keep_existing false \ + --keep_existing "$keep_existing" \ --verbose "$verbose" \ -- \ --verbose $verbose -- $image $group $node |