annotate scripts/updates-pull.sh @ 590:80f3564f2553 production v2.20.0

flow: Merged <release> '2.20.0' to <master> ('production').
author Marc Davis <marc.davis@mcoecn.org>
date Thu, 05 Sep 2024 15:01:40 -0400
parents 9afc8cb478f6
children
rev   line source
54
334d65dac778 add hash bangs to specify bash shell
smith@nwoca.org
parents: 51
diff changeset
1 #!/bin/bash
49
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
2 #
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
3 # Pulls updates from upstream repository for images matching filter. The
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
4 # default filter pulls all ssdt application images.
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
5 #
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
6 # Usage:
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
7 # pull-updates.sh [application] [filter]
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
8 #
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
9 # defaults:
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
10 # application=all applications
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
11 # filter=label=io.ssdt.app[=application]
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
12 #
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
13 # Note: if filter is provided, the first argument is ignored. A complete filter must be supplied.
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
14 #
191
fea886ba7279 DEP-12: add source for .functions.sh to all scripts using compose
smith@nwoca.org
parents: 157
diff changeset
15 source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh"
fea886ba7279 DEP-12: add source for .functions.sh to all scripts using compose
smith@nwoca.org
parents: 157
diff changeset
16
49
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
17 APP=${1:+=$1}
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
18 FILTER=${2:-label=io.ssdt.app$APP}
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
19 while read -a line
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
20 do
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
21 repo=${line[0]}
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
22 tag=${line[1]}
574
9afc8cb478f6 Domain changed from ssdt.io to ssdt-ohio.org
Marc Davis <marc.davis@mcoecn.org>
parents: 191
diff changeset
23 if [[ $repo == docker.ssdt-ohio.org* && $tag != *none* ]]
49
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
24 then
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
25 echo "docker pull ${repo}:${tag}"
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
26 docker pull ${repo}:${tag}
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
27 fi
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
28 done < <(docker images --filter "$FILTER")