-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 740 Bytes
/
Makefile
File metadata and controls
29 lines (20 loc) · 740 Bytes
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
SPEED := 0
NAME := web-application
VERSION := latest
DOCKER_COMPOSE_FILE := docker-compose.yml
DOCKER_COMPOSE_TEST_FILE := docker-compose.test.yml
DOCKER_COMPOSE_COMMAND := docker-compose -f $(DOCKER_COMPOSE_FILE)
DOCKER_COMPOSE_TEST_COMMAND := $(DOCKER_COMPOSE_COMMAND) -f $(DOCKER_COMPOSE_TEST_FILE) -p test
.DEFAULT_GOAL := test
.PHONY: build clean test
build:
@ docker build -t $(NAME):$(VERSION) web-application
clean:
@ docker stop $$(docker ps -q) || true
@ docker system prune -f
test:
@ $(DOCKER_COMPOSE_TEST_COMMAND) build
@ $(DOCKER_COMPOSE_TEST_COMMAND) run robot; CODE=$$?; \
$(DOCKER_COMPOSE_TEST_COMMAND) rm -s -f; exit $$CODE
test-local:
@ robot -v SPEED:$(SPEED) --outputdir tests/results tests/local.robot