Browse code

Enforce our use of the explicitly frozen images

This requires that any environment where we wish to run the integration-cli tests includes both the `Dockerfile` and `curl`, which has been deemed an appropriate and acceptable trade-off.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>

Tianon Gravi authored on 2015/03/17 05:37:49
Showing 1 changed files
... ...
@@ -11,10 +11,10 @@ if ! docker inspect "${images[@]}" &> /dev/null; then
11 11
 	hardCodedDir='/docker-frozen-images'
12 12
 	if [ -d "$hardCodedDir" ]; then
13 13
 		( set -x; tar -cC "$hardCodedDir" . | docker load )
14
-	elif [ -e Dockerfile ] && command -v curl > /dev/null; then
15
-		# testing for "curl" because "download-frozen-image.sh" is built around curl
14
+	else
16 15
 		dir="$DEST/frozen-images"
17 16
 		# extract the exact "RUN download-frozen-image.sh" line from the Dockerfile itself for consistency
17
+		# NOTE: this will fail if either "curl" is not installed or if the Dockerfile is not available/readable
18 18
 		awk '
19 19
 			$1 == "RUN" && $2 == "./contrib/download-frozen-image.sh" {
20 20
 				for (i = 2; i < NF; i++)
... ...
@@ -33,11 +33,5 @@ if ! docker inspect "${images[@]}" &> /dev/null; then
33 33
 			}
34 34
 		' Dockerfile | sh -x
35 35
 		( set -x; tar -cC "$dir" . | docker load )
36
-	else
37
-		for image in "${images[@]}"; do
38
-			if ! docker inspect "$image" &> /dev/null; then
39
-				( set -x; docker pull "$image" )
40
-			fi
41
-		done
42 36
 	fi
43 37
 fi