annotate scripts/updates-pull.sh @ 52:9832111e8d7c

typo
author Dave smith <smith@nwoca.org>
date Mon, 22 Feb 2016 17:35:52 -0500
parents 40e10b1d32f7
children 334d65dac778
rev   line source
49
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
1 #
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
2 # 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
3 # default filter pulls all ssdt application images.
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
4 #
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
5 # Usage:
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
6 # pull-updates.sh [application] [filter]
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
7 #
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
8 # defaults:
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
9 # application=all applications
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
10 # filter=label=io.ssdt.app[=application]
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
11 #
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
12 # 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
13 #
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
14 APP=${1:+=$1}
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
15 FILTER=${2:-label=io.ssdt.app$APP}
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
16 while read -a line
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
17 do
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
18 repo=${line[0]}
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
19 tag=${line[1]}
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
20 if [[ $repo == docker.ssdt.io* ]]
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
21 then
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
22 echo "docker pull ${repo}:${tag}"
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
23 docker pull ${repo}:${tag}
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
24 fi
757f89c5a19c add script to pull updated ssdt app images
smith@nwoca.org
parents:
diff changeset
25 done < <(docker images --filter "$FILTER")