Archived
makefile
This commit is contained in:
1 parent
ea563acee9
commit
1b6dab9852
3 files changed
+29
-2
No files matched your search
@@ -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,3 +6,9 @@ $dir/delete-image.sh > /dev/null 2>&1
|
|||||||
|
|
||||||
echo "------- End -------"
|
echo "------- End -------"
|
||||||
echo $error " failed " $ok " succeeded"
|
echo $error " failed " $ok " succeeded"
|
||||||
|
|
||||||
|
if [ "$error" -eq 0 ]; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
echo "docker.io run --name $testContainer $runOptions -d $testImage"
|
echo "docker.io run --name $testContainer $runOptions -d $testImage"
|
||||||
ID=`docker.io run --name $testContainer $runOptions -d $testImage`
|
ID=`docker.io run --name $testContainer $runOptions -d $testImage`
|
||||||
sleep 7
|
sleep 10
|
||||||
|
|
||||||
echo " --> Obtaining IP"
|
echo " --> Obtaining IP"
|
||||||
IP=`docker inspect -f "{{ .NetworkSettings.IPAddress }}" $ID`
|
IP=`docker.io inspect -f "{{ .NetworkSettings.IPAddress }}" $ID`
|
||||||
if [ "$IP" = "" ]; then
|
if [ "$IP" = "" ]; then
|
||||||
abort "Unable to obtain container IP"
|
abort "Unable to obtain container IP"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in new issue
Block a user