forked from longguikeji/arkid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (45 loc) · 1.58 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
.PHONY: \
ci \
lint test build \
all requirements docker docker-build docker-push \
sql-ldap-docker sql-ldap-docker-build sql-ldap-docker-push \
native-ldap-docker native-ldap-docker-build native-ldap-docker-push
VERSION ?= 1.0.`date +%Y%m%d`
BASE_COMMIT_ID ?= ""
ci:
docker build --build-arg base_commit_id="origin/master" \
-t harbor.longguikeji.com/ark-releases/arkid:$(VERSION) .
test:
python manage.py migrate && python manage.py test siteapi.v1.tests --settings=oneid.settings_test
lint:
@if [ ${BASE_COMMIT_ID}x != ""x ]; \
then \
git reset ${BASE_COMMIT_ID}; \
git add .; \
fi
.git/hooks/pre-commit
requirements:
pipenv run pipenv_to_requirements -f
build: docker-dev-build
docker-dev: docker-dev-build docker-dev-push
docker-dev-build:
docker build -t harbor.longguikeji.com/ark-releases/arkid:$(VERSION) .
docker-dev-push:
docker push harbor.longguikeji.com/ark-releases/arkid:$(VERSION)
docker-prod: docker-prod-build docker-prod-push
docker-prod-build:
docker build -t longguikeji/arkid:$(VERSION) .
docker-prod-push:
docker push longguikeji/arkid:$(VERSION)
sql-ldap-docker: sql-ldap-docker-build sql-ldap-docker-push
sql-ldap-docker-build:
cd ldap/sql_backend/docker && \
docker build -t longguikeji/ark-sql-ldap:$(VERSION) .
sql-ldap-docker-push:
docker push longguikeji/ark-sql-ldap:$(VERSION)
native-ldap-docker: native-ldap-docker-build native-ldap-docker-build
native-ldap-docker-build:
cd ldap/native_backend && \
docker build -t longguikeji/ark-native-ldap:$(VERSION) .
native-ldap-docker-push:
docker push longguikeji/ark-native-ldap:$(VERSION)