Repository navigation
Expand file tree
/
Copy pathbuildall
More file actions
executable file
·50 lines (44 loc) · 1.48 KB
/
Copy pathbuildall
File metadata and controls
executable file
·50 lines (44 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
set -e
set -u
set -o pipefail
DISTS="jessie
unstable
wheezy
"
LATEST=jessie
BASENAME=bitnami/minideb
GCR_BASENAME=gcr.io/bitnami-containers/minideb
mkdir -p build
import() {
SOURCE=$1
docker import --change "CMD /bin/bash" -m "From Bitnami with love." $SOURCE
}
for DIST in $DISTS; do
[ -f debootstrap/$DIST ] || (echo "buildall: Unknown distribution: $DIST" && exit 1)
echo "============================================"
echo "Building $BASENAME:$DIST"
echo "============================================"
./mkimage build/$DIST.tar $DIST
IMPORTED=$(import build/$DIST.tar)
echo "============================================"
echo "Running tests for $BASENAME:$DIST"
echo "============================================"
./test $IMPORTED
echo "============================================"
echo "Rebuilding $BASENAME:$DIST to test reproducability"
echo "============================================"
./mkimage build/${DIST}-repro.tar $DIST
REPRO=$(import build/${DIST}-repro.tar)
if ! ./dockerdiff $IMPORTED $REPRO; then
echo "$BASENAME:$DIST differs after a rebuild. Examine $IMPORTED and $REPRO"
echo "to find the differences and fix the build to be reproducible again."
exit 1
fi
rm build/${DIST}-repro.tar
docker rmi $REPRO
docker tag $IMPORTED $BASENAME:$DIST
docker tag $IMPORTED $GCR_BASENAME:$DIST
done
docker tag $BASENAME:$LATEST $BASENAME:latest
docker tag $GCR_BASENAME:$LATEST $GCR_BASENAME:latest