We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 762a8f1 commit f29260bCopy full SHA for f29260b
test-build.sh
@@ -0,0 +1,37 @@
1
+#!/usr/bin/env bash
2
+#
3
+# Run a test build for all images.
4
+
5
+set -uo pipefail
6
+IFS=$'\n\t'
7
8
+DOCKERFILES=$(find . -name Dockerfile)
9
10
+info() {
11
+ printf "%s\n" "$@"
12
+}
13
14
+fatal() {
15
+ printf "**********\n"
16
17
18
+ exit 1
19
20
21
+for DOCKERFILE in $DOCKERFILES ; do
22
+ TAG=$(echo $DOCKERFILE | sed 's/Dockerfile//g')
23
+ info "=========="
24
+ info "Building $TAG..."
25
+ docker build -q $TAG
26
+ if [[ $? -gt 0 ]]; then
27
+ fatal "Build of $TAG failed!"
28
+ else
29
+ info "Build of $TAG succeeded"
30
+ fi
31
+done
32
33
+info "All builds successful!"
34
+info "Dockerfiles:"
35
+info "$DOCKERFILES"
36
37
+exit 0
0 commit comments