-
Notifications
You must be signed in to change notification settings - Fork 2
/
build-all
executable file
·43 lines (40 loc) · 889 Bytes
/
build-all
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
#!/bin/bash
set -e
LIST=${LIST:-pg base portal uwsgi-portal manager full ssoaas-fastcgi-server cron}
#LIST=${LIST:-pg base portal uwsgi-portal manager full ssoaas-fastcgi-server cron dev}
for i in $LIST; do
(
cd $i
if test "$i" = "dev"; then
./build-dev
else
NAME=`grep 'name="yadd/' Dockerfile|sed -e 's/.*name="//' -e 's/".*$//'`
docker build --rm -t $NAME --build-arg="BASE=yadd/lemonldap-ng-base:latest" --build-arg "PORTALBASE=yadd/lemonldap-ng-portal:latest" .
if test "$IMAGE_EXPORT" = "yes"; then
docker save $NAME > /tmp/$i.tar
fi
if test "$PUBLISH" = "yes"; then
docker push $NAME
fi
fi
if test "$i" != "full"; then
if test -x test; then
./test
fi
fi
)
done
for i in $LIST; do
(
cd $i
if test -x clean; then
./clean || true
fi
)
done
if test "$IMAGE_EXPORT" = "yes"; then
(
cd /tmp
tar czf images.tar.gz ${LIST// /.tar }.tar
)
fi