Skip to content

Commit 7a36244

Browse files
committed
ref(*): use standard project dirs
1 parent 21addc8 commit 7a36244

305 files changed

Lines changed: 87 additions & 179 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ before_install:
2727
- source $HOME/virtualenv/python2.7/bin/activate
2828
- createdb -U postgres deis
2929
install:
30-
- pip install -r controller/requirements.txt
31-
- pip install -r controller/dev_requirements.txt
30+
- pip install -r rootfs/requirements.txt
31+
- pip install -r rootfs/dev_requirements.txt
3232
- GLIDE_HOME=/home/travis/.glide make -C client bootstrap
3333
script:
34-
- make -C controller test
35-
- make -C client test
34+
- make test
35+
- make -C client/ test

Makefile

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,47 @@
1-
include includes.mk
21

3-
build:
4-
$(MAKE) -C client/ build
5-
$(MAKE) -C controller/ build
2+
COMPONENT = workflow
3+
IMAGE = $(IMAGE_PREFIX)$(COMPONENT):$(BUILD_TAG)
4+
SHELL_SCRIPTS = $(wildcard rootfs/bin/*) $(shell find "rootfs" -name '*.sh')
65

7-
clean:
8-
$(MAKE) -C client/ clean
9-
$(MAKE) -C controller/ clean
6+
check-docker:
7+
@if [ -z $$(which docker) ]; then \
8+
echo "Missing \`docker\` client which is required for development"; \
9+
exit 2; \
10+
fi
11+
12+
build: check-docker
13+
docker build --rm -t $(IMAGE) rootfs
14+
15+
clean: check-docker
16+
docker rmi $(IMAGE)
1017

1118
commit-hook:
1219
cp contrib/util/commit-msg .git/hooks/commit-msg
1320

21+
full-clean: check-docker
22+
docker images -q $(IMAGE_PREFIX)$(COMPONENT) | xargs docker rmi -f
23+
24+
postgres:
25+
docker start postgres || docker run --restart="always" -d -p 5432:5432 --name postgres postgres:9.3
26+
docker exec postgres createdb -U postgres deis 2>/dev/null || true
27+
@echo "To use postgres for local development:"
28+
@echo " export PGHOST=`docker-machine ip $$(docker-machine active) 2>/dev/null || echo 127.0.0.1`"
29+
@echo " export PGPORT=5432"
30+
@echo " export PGUSER=postgres"
31+
32+
setup-venv:
33+
@if [ ! -d venv ]; then virtualenv venv; fi
34+
venv/bin/pip install --disable-pip-version-check -q -r rootfs/requirements.txt -r rootfs/dev_requirements.txt
35+
1436
test: test-style test-unit
1537

1638
test-unit:
17-
$(MAKE) -C client/ test-unit
18-
$(MAKE) -C controller/ test-unit
39+
cd rootfs \
40+
&& coverage run manage.py test --noinput web registry api \
41+
&& coverage report -m
1942

2043
test-style:
21-
$(MAKE) -C client/ test-style
22-
$(MAKE) -C controller/ test-style
44+
cd rootfs && flake8 --show-pep8 --show-source
45+
shellcheck $(SHELL_SCRIPTS)
2346

24-
.PHONY: build clean commit-hook test test-unit test-style
47+
.PHONY: build clean commit-hook full-clean postgres setup-venv test test-unit test-style
File renamed without changes.

0 commit comments

Comments
 (0)