Merge branch 'feature-makefile' into release-0.8.0

This commit is contained in:
Bertrand Gouny committed 2014-06-24 15:14:44 +02:00
commit e4a4f6a667
3 files changed
+29 -2

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
NAME = osixia/openldap
VERSION = 0.7.4
.PHONY: all build test tag_latest release
all: build
build:
docker.io build -t $(NAME):$(VERSION) --rm .
test:
env NAME=$(NAME) VERSION=$(VERSION) ./test.sh
tag_latest:
docker.io tag $(NAME):$(VERSION) $(NAME):latest
release: build test tag_latest
@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
docker.io push $(NAME)
@echo "*** Don't forget to run 'twgit release finish' :)"
+6
View File
@@ -5,3 +5,9 @@
echo "------- End -------"
echo $error " failed " $ok " succeeded"
if [ "$error" -eq 0 ]; then
exit 0
else
exit 1
fi
+2 -2
View File
@@ -2,10 +2,10 @@
echo "docker.io run --name $testContainer $runOptions -d $testImage"
ID=`docker.io run --name $testContainer $runOptions -d $testImage`
sleep 7
sleep 10
echo " --> Obtaining IP"
IP=`docker inspect -f "{{ .NetworkSettings.IPAddress }}" $ID`
IP=`docker.io inspect -f "{{ .NetworkSettings.IPAddress }}" $ID`
if [ "$IP" = "" ]; then
abort "Unable to obtain container IP"
exit 1