-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (36 loc) · 1.25 KB
/
Makefile
File metadata and controls
48 lines (36 loc) · 1.25 KB
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
include ../includes.mk
build:
$(call rsync_all)
$(call ssh_all,'cd share/registry && sudo docker build -t deis/registry .')
install: check-fleet
$(FLEETCTL) load systemd/*
uninstall: check-fleet stop
$(FLEETCTL) unload systemd/*
$(FLEETCTL) destroy systemd/*
start: check-fleet
$(FLEETCTL) start -no-block systemd/*
stop: check-fleet
$(FLEETCTL) stop -block-attempts=600 systemd/*
restart: stop start
run: install start
clean: uninstall
$(call ssh_all,'sudo docker rm -f deis-registry')
full-clean: clean
$(call ssh_all,'sudo docker rmi deis/registry')
test: test-unit test-functional
test-unit:
# Requires libevent-dev, libffi-dev, libpython-dev, libssl-dev, liblzma-dev on Ubuntu
@if [ ! -d test-unit.tmp ]; then \
git clone -b 0.6.8 https://github.com/dotcloud/docker-registry test-unit.tmp; \
fi
virtualenv venv
venv/bin/pip install -q -r test-unit.tmp/requirements.txt
venv/bin/pip install -q -r test-unit.tmp/test-requirements.txt
@if [ -d /tmp/test ]; then \
rm -rf /tmp/test; \
fi
cd test-unit.tmp && \
DOCKER_REGISTRY_CONFIG=config_test.yml SETTINGS_FLAVOR=test PYTHONPATH=test \
../venv/bin/python -m unittest discover -s test
test-functional:
GOPATH=$(CURDIR)/../tests/_vendor:$(GOPATH) go test -v -timeout 20m ./tests/...