|
1 | | -# If DEIS_REGISTRY is not set, try to populate it from legacy DEV_REGISTRY |
2 | | -DEIS_REGISTRY ?= $(DEV_REGISTRY) |
3 | | -IMAGE_PREFIX ?= deis |
4 | | -COMPONENT ?= workflow |
5 | | -VERSION ?= git-$(shell git rev-parse --short HEAD) |
6 | | -IMAGE = $(DEIS_REGISTRY)$(IMAGE_PREFIX)/$(COMPONENT):$(VERSION) |
7 | | -SHELL_SCRIPTS = $(wildcard rootfs/bin/*) $(shell find "rootfs" -name '*.sh') $(wildcard _scripts/*.sh) |
8 | | - |
9 | | -info: |
10 | | - @echo "Build tag: ${VERSION}" |
11 | | - @echo "Registry: ${DEIS_REGISTRY}" |
12 | | - @echo "Image: ${IMAGE}" |
13 | | - |
14 | | -check-docker: |
15 | | - @if [ -z $$(which docker) ]; then \ |
16 | | - echo "Missing \`docker\` client which is required for development"; \ |
17 | | - exit 2; \ |
18 | | - fi |
19 | | - |
20 | | -build: docker-build |
21 | | - |
22 | | -docker-build: check-docker |
23 | | - docker build --rm -t $(IMAGE) rootfs |
24 | | - |
25 | | -docker-push: update-manifests |
26 | | - docker push ${IMAGE} |
27 | | - |
28 | | -kube-delete: |
29 | | - -kubectl delete service deis-workflow |
30 | | - -kubectl delete rc deis-workflow |
31 | | - |
32 | | -kube-delete-database: |
33 | | - -kubectl delete service deis-database |
34 | | - -kubectl delete rc deis-database |
35 | | - |
36 | | -kube-delete-all: kube-delete kube-delete-database |
37 | | - |
38 | | -kube-create: update-manifests |
39 | | - kubectl create -f manifests/deis-workflow-service.yml |
40 | | - kubectl create -f manifests/deis-workflow-rc.tmp.yml |
41 | | - |
42 | | -kube-create-database: |
43 | | - kubectl create -f manifests/deis-database-rc.yml |
44 | | - kubectl create -f manifests/deis-database-service.yml |
45 | | - |
46 | | -kube-create-all: kube-create-database kube-create |
47 | | - |
48 | | -kube-update: update-manifests |
49 | | - kubectl delete -f manifests/deis-workflow-rc.tmp.yml |
50 | | - kubectl create -f manifests/deis-workflow-rc.tmp.yml |
51 | | - |
52 | | -update-manifests: |
53 | | - sed 's#\(image:\) .*#\1 $(IMAGE)#' manifests/deis-workflow-rc.yml \ |
54 | | - > manifests/deis-workflow-rc.tmp.yml |
55 | | - |
56 | | -clean: check-docker |
57 | | - docker rmi $(IMAGE) |
58 | | - |
59 | | -commit-hook: |
60 | | - cp contrib/util/commit-msg .git/hooks/commit-msg |
61 | | - |
62 | | -full-clean: check-docker |
63 | | - docker images -q $(IMAGE_PREFIX)$(COMPONENT) | xargs docker rmi -f |
64 | | - |
65 | | -postgres: |
66 | | - docker start postgres || docker run --restart="always" -d -p 5432:5432 --name postgres postgres:9.3 |
67 | | - docker exec postgres createdb -U postgres deis 2>/dev/null || true |
68 | | - @echo "To use postgres for local development:" |
69 | | - @echo " export PGHOST=`docker-machine ip $$(docker-machine active) 2>/dev/null || echo 127.0.0.1`" |
70 | | - @echo " export PGPORT=5432" |
71 | | - @echo " export PGUSER=postgres" |
72 | | - |
73 | | -setup-venv: |
74 | | - @if [ ! -d venv ]; then virtualenv venv; fi |
75 | | - venv/bin/pip install --disable-pip-version-check -q -r rootfs/requirements.txt -r rootfs/dev_requirements.txt |
76 | | - |
77 | | -test: test-style test-check test-unit test-functional |
78 | | - |
79 | | -test-check: |
80 | | - cd rootfs && python manage.py check |
81 | | - |
82 | | -test-style: |
83 | | - cd rootfs && flake8 --show-pep8 --show-source |
84 | | - shellcheck $(SHELL_SCRIPTS) |
85 | | - |
86 | | -test-unit: |
87 | | - cd rootfs \ |
88 | | - && coverage run manage.py test --noinput registry api \ |
89 | | - && coverage report -m |
90 | | - |
91 | | -test-functional: |
92 | | - @echo "Implement functional tests in _tests directory" |
93 | | - |
94 | | -test-integration: |
95 | | - @echo "Check https://github.com/deis/workflow-e2e for the complete interation test suite" |
96 | | - |
97 | | -.PHONY: build clean commit-hook full-clean postgres setup-venv test test-style test-unit test-functional |
| 1 | +# Makefile for MkDocs documentation |
| 2 | +# |
| 3 | + |
| 4 | +# You can set these variables from the command line. |
| 5 | +BUILDDIR = _build |
| 6 | +MKDOCS = mkdocs |
| 7 | +MKDOCSBUILDOPTS = --clean --strict --verbose |
| 8 | +MKDOCSBUILD = $(MKDOCS) build $(MKDOCSBUILDOPTS) |
| 9 | + |
| 10 | +build: |
| 11 | + $(MKDOCSBUILD) --site-dir $(BUILDDIR)/html |
| 12 | + @echo |
| 13 | + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." |
| 14 | + |
| 15 | +clean: |
| 16 | + rm -rf $(BUILDDIR)/* |
| 17 | + |
| 18 | +deps: |
| 19 | + pip install -r requirements.txt |
| 20 | + |
| 21 | +test: build |
| 22 | + grep -q '<h1 id="welcome">Welcome</h1>' _build/html/index.html |
| 23 | + @echo |
| 24 | + @echo "Test finished. The HTML pages are in $(BUILDDIR)/html." |
0 commit comments