aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 17 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f08ca2d..9f19a55 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,7 @@ help:
@echo "- clean: drop existing container and image"
@echo "- distclean: drop temp images (the one produced by a bad Dockerfile...)"
@echo "- build: create new image"
+ @echo "- build-debug: create new image (debug mode = break and wait at first error)"
@echo "- test: start a new test container and enter in it. After exit, the container is destoyed"
@echo "- push: push the image to registry $(REGISTRY)"
@echo "- push-latest: push the image to registry $(REGISTRY) and also tag as 'latest'"
@@ -55,6 +56,7 @@ clean:
echo "Removing image $(IMAGE_LATEST)"; \
docker rmi $(IMAGE_LATEST) ; \
} || true
+ @rm -f INSTALL/DEBUG
# remove spurious containers and images left by broken builds
.PHONY:distclean
@@ -64,11 +66,23 @@ distclean: clean
docker rmi $$imgid; \
done
+.PHONY:build-debug
+build-debug:
+ @echo "------------------- Building image $(NAME) (debug mode) -------------------"
+ @touch INSTALL/DEBUG
+ @docker build --no-cache=true --rm --pull -t $(IMAGE_NAME) .
+ @rm -f INSTALL/DEBUG
+ @docker images
+
+# inside jenkins, we don't want the build script to break and wait for interaction
+# after first error. So we remove the file inside INSTALL dir which indicates to the
+# setup script to enable DEBUG.
.PHONY:build
build:
- @echo "------------------- Building image $(NAME) -------------------"; \
- docker build --no-cache=true --rm --pull -t $(IMAGE_NAME) .
- docker images
+ @echo "------------------- Building image $(NAME) -------------------"
+ @rm -f INSTALL/DEBUG
+ @docker build --no-cache=true --rm --pull -t $(IMAGE_NAME) .
+ @docker images
.PHONY:test
test: