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-llvmbot-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-llvmbot-containers.sh')
-rwxr-xr-x | tcwg-update-llvmbot-containers.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tcwg-update-llvmbot-containers.sh b/tcwg-update-llvmbot-containers.sh index 037a5daa..3bc4fe23 100755 --- a/tcwg-update-llvmbot-containers.sh +++ b/tcwg-update-llvmbot-containers.sh @@ -10,11 +10,18 @@ convert_args_to_variables "$@" obligatory_variables NODE_NAME password distro="${distro-xenial}" +force="${force-false}" master="${master-silent}" verbose="${verbose-true}" if $verbose; then set -x; fi +if $force; then + keep_existing=false +else + keep_existing=keep_if_same_image +fi + case "$NODE_NAME:$master" in tcwg-llvmbot_d05-01:normal) bot_prefix=linaro-armv8-01- @@ -52,7 +59,7 @@ for bot in "${bots[@]+${bots[@]}}"; do $scripts/tcwg-start-container.sh \ --container "$master-${bot_prefix}$bot" \ --image "$image" \ - --keep_existing "false" \ + --keep_existing "$keep_existing" \ --verbose "$verbose" \ -- \ $image $master ${bot_prefix}$bot $password |