Skip to content

Commit 1b6dab9

Browse files
author
Bertrand Gouny
committed
makefile
1 parent ea563ac commit 1b6dab9

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
NAME = osixia/openldap
2+
VERSION = 0.7.4
3+
4+
.PHONY: all build test tag_latest release
5+
6+
all: build
7+
8+
build:
9+
docker.io build -t $(NAME):$(VERSION) --rm .
10+
11+
test:
12+
env NAME=$(NAME) VERSION=$(VERSION) ./test.sh
13+
14+
tag_latest:
15+
docker.io tag $(NAME):$(VERSION) $(NAME):latest
16+
17+
release: build test tag_latest
18+
@if ! docker.io images $(NAME) | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME) version $(VERSION) is not yet built. Please run 'make build'"; false; fi
19+
docker.io push $(NAME)
20+
@echo "*** Don't forget to run 'twgit release finish' :)"
21+

test/tools/end.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ $dir/delete-image.sh > /dev/null 2>&1
66

77
echo "------- End -------"
88
echo $error " failed " $ok " succeeded"
9+
10+
if [ "$error" -eq 0 ]; then
11+
exit 0
12+
else
13+
exit 1
14+
fi

test/tools/run-container.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
echo "docker.io run --name $testContainer $runOptions -d $testImage"
44
ID=`docker.io run --name $testContainer $runOptions -d $testImage`
5-
sleep 7
5+
sleep 10
66

77
echo " --> Obtaining IP"
8-
IP=`docker inspect -f "{{ .NetworkSettings.IPAddress }}" $ID`
8+
IP=`docker.io inspect -f "{{ .NetworkSettings.IPAddress }}" $ID`
99
if [ "$IP" = "" ]; then
1010
abort "Unable to obtain container IP"
1111
exit 1

0 commit comments

Comments
 (0)