forked from yuzutech/kroki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
69 lines (57 loc) · 2.83 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
LATEST_VERSION = 0.2.0
SMOKE_TESTS_DIR=tests/smoke
COMPOSE_TIMEOUT=20
SERVICES_TIMEOUT=15
default:
installLocalDependencies:
mvn install:install-file -Dfile=./umlet/lib/umlet-mini-14.3.0.jar -DgroupId=com.umlet -DartifactId=umlet-mini -Dversion=14.3.0 -Dpackaging=jar
mvn install:install-file -Dfile=./server/lib/ditaa-1.3.13.jar -DgroupId=ditaa -DartifactId=ditaa -Dversion=1.3.13 -Dpackaging=jar
mvn install:install-file -Dfile=./server/lib/ditaamini-0.11.jar -DgroupId=ditaa -DartifactId=ditaa-mini -Dversion=0.11 -Dpackaging=jar
buildServer:
mvn clean package
setServerVersion:
mvn versions:set -DnewVersion=$(LATEST_VERSION)
buildDockerImages:
cd nomnoml && $(MAKE) package
cd vega && $(MAKE) package
cd wavedrom && $(MAKE) package
docker build -f server/ops/docker/build-static-erd -t kroki-builder-static-erd .
docker build -f server/ops/docker/build-static-svgbob -t kroki-builder-static-svgbob .
cd server && $(MAKE) package
cd blockdiag && $(MAKE) package
cd mermaid && $(MAKE) package
tagDockerImages:
docker tag kroki-builder-static-erd:latest kroki-builder-static-erd:0.2.0.0
docker tag kroki-builder-static-svgbob:latest kroki-builder-static-svgbob:0.4.2
docker tag kroki-builder-nomnoml:latest kroki-builder-nomnoml:0.6.2
docker tag kroki-builder-vega:latest kroki-builder-vega:5.10.0-4.7.0
docker tag kroki-builder-wavedrom:latest kroki-builder-wavedrom:2.3.2
showExamples:
python blockdiag/examples.py
releaseDockerImages:
docker tag yuzutech/kroki:latest yuzutech/kroki:$(LATEST_VERSION)
docker tag yuzutech/kroki-blockdiag:latest yuzutech/kroki-blockdiag:$(LATEST_VERSION)
docker tag yuzutech/kroki-mermaid:latest yuzutech/kroki-mermaid:$(LATEST_VERSION)
docker tag yuzutech/kroki:latest yuzutech/kroki:latest
docker tag yuzutech/kroki-blockdiag:latest yuzutech/kroki-blockdiag:latest
docker tag yuzutech/kroki-mermaid:latest yuzutech/kroki-mermaid:latest
pushDockerImages:
docker push yuzutech/kroki:latest
docker push yuzutech/kroki-blockdiag:latest
docker push yuzutech/kroki-mermaid:latest
docker push yuzutech/kroki:$(LATEST_VERSION)
docker push yuzutech/kroki-blockdiag:$(LATEST_VERSION)
docker push yuzutech/kroki-mermaid:$(LATEST_VERSION)
smokeTests:
@docker-compose --file "$(SMOKE_TESTS_DIR)/docker-compose.yaml" up --build --detach \
&& echo \
&& docker-compose --file "$(SMOKE_TESTS_DIR)/docker-compose.yaml" ps \
&& echo \
&& "$(SMOKE_TESTS_DIR)/wait-for-it.sh" localhost:8000 --timeout="$(COMPOSE_TIMEOUT)" \
&& "$(SMOKE_TESTS_DIR)/wait-for-it.sh" localhost:8001 --timeout="$(COMPOSE_TIMEOUT)" \
&& "$(SMOKE_TESTS_DIR)/wait-for-it.sh" localhost:8002 --timeout="$(COMPOSE_TIMEOUT)" \
&& echo \
&& echo 'Waiting for the containers'\'' services to be available... ($(SERVICES_TIMEOUT) seconds)' \
&& sleep "$(SERVICES_TIMEOUT)" \
&& npm test \
&& docker-compose -f "$(SMOKE_TESTS_DIR)/docker-compose.yaml" stop