Add build tests for the example dockerfiles
This commit is contained in:
parent
50b9eadbff
commit
ce5b814886
@ -20,6 +20,7 @@ before_script:
|
|||||||
script:
|
script:
|
||||||
- travis_retry docker build -t "$image" "${VERSION}/${VARIANT}"
|
- travis_retry docker build -t "$image" "${VERSION}/${VARIANT}"
|
||||||
- ~/official-images/test/run.sh "$image"
|
- ~/official-images/test/run.sh "$image"
|
||||||
|
- .travis/test-example-dockerfiles.sh "$image"
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- docker images
|
- docker images
|
||||||
|
19
.travis/test-example-dockerfiles.sh
Executable file
19
.travis/test-example-dockerfiles.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
image="$1"
|
||||||
|
|
||||||
|
cd .examples/dockerfiles
|
||||||
|
|
||||||
|
dirs=( */ )
|
||||||
|
dirs=( "${dirs[@]%/}" )
|
||||||
|
for dir in "${dirs[@]}"; do
|
||||||
|
if [ -d "$dir/$VARIANT" ]; then
|
||||||
|
(
|
||||||
|
cd "$dir/$VARIANT"
|
||||||
|
sed -ri -e 's/^FROM .*/FROM '"$image"'/g' 'Dockerfile'
|
||||||
|
docker build -t "$image-$dir" .
|
||||||
|
~/official-images/test/run.sh "$image-$dir"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user