-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
71 lines (51 loc) · 1.73 KB
/
Makefile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Makefile for Syndicate CI Test
WORKSPACE ?= .
CONTAINER_DIR ?= ${WORKSPACE}/containers
RESULT_DIR ?= ${WORKSPACE}/results
OUTPUT_DIR ?= ${WORKSPACE}/output
NO_DOCKER_CACHE ?= false
DOCKER ?= docker
DOCKER_COMPOSE ?= docker-compose -f $(CONTAINER_DIR)/docker-compose.yml
GAE_SDK := $(CONTAINER_DIR)/google_appengine_1.9.40.zip
$(GAE_SDK):
curl -o $@ https://storage.googleapis.com/appengine-sdks/featured/$(@F)
# For configuring the MS
BUILD_MS := $(CONTAINER_DIR)/ms
CONFIG_DIR := $(CONTAINER_DIR)/ms
# name of docker container w/ms in it
MS_APP_PUBLIC_HOST := ms
include configure_ms.mk
cleanbuild:
docker build -f $(CONTAINER_DIR)/Dockerfile.base --no-cache=true --rm -t syndicate-ci-base $(CONTAINER_DIR)
build:
docker build -f $(CONTAINER_DIR)/Dockerfile.base --no-cache=${NO_DOCKER_CACHE} --rm -t syndicate-ci-base $(CONTAINER_DIR)
syndicate-tests:
git pull https://github.com/syndicate-storage/syndicate-tests
tests: syndicate-tests
bash syndicate-tests/testwrapper.sh
full_test: docker_test docker_logs rmi
docker_test: up
$(DOCKER_COMPOSE) run test /opt/syndicate-tests/testwrapper.sh -c -m -b ${BUILD_URL}
docker_logs:
$(DOCKER_COMPOSE) logs -t --no-color ms > ${OUTPUT_DIR}/docker_logs 2>&1
# sleep is to let the MS start up
up: $(GAE_SDK) build $(CONTAINER_DIR)/ms/app.yaml
chmod a+w output results
$(DOCKER_COMPOSE) build
$(DOCKER_COMPOSE) up --timeout 1 -d ms
sleep 10
stop:
$(DOCKER_COMPOSE) stop
rm: stop
-$(DOCKER_COMPOSE) rm --force --all
rmi: rm
-$(DOCKER) rmi `docker images | grep "^<none>" | awk '{print $$3}'`
manual_test: up
$(DOCKER_COMPOSE) run test bash
enter:
$(DOCKER) exec -it syndicate-ci-ms bash
showlogs:
$(DOCKER_COMPOSE) logs
clean: clean_certs
rm -f $(RESULT_DIR)/*.tap
rm -rf $(OUTPUT_DIR)/*