forked from yuzutech/kroki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (51 loc) · 2.08 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
MULTI_ARCH_AVAILABLE := $(shell docker buildx inspect | grep amd64 | grep arm64 > /dev/null 2>&1; echo $$?)
TESTS_DIR=ci/tests
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/ditaamini-1.0.3.jar -DgroupId=ditaa -DartifactId=ditaa-mini -Dversion=1.0.3 -Dpackaging=jar
buildServer:
mvn --no-transfer-progress clean package
setServerVersion:
ifndef RELEASE_VERSION
$(error RELEASE_VERSION is undefined)
endif
mvn versions:set -DnewVersion=$(RELEASE_VERSION)
buildDockerImages:
ifeq ($(MULTI_ARCH_AVAILABLE), 0)
docker buildx bake --set "*.cache-from=$(CACHE_FROM)" --set "*.cache-to=$(CACHE_TO)" --set "kroki-*.platform=linux/arm64,linux/amd64"
else
docker buildx bake --set "*.cache-from=$(CACHE_FROM)" --set "*.cache-to=$(CACHE_TO)"
endif
publishDockerImages:
ifndef RELEASE_VERSION
$(error RELEASE_VERSION is undefined)
endif
docker buildx bake -f docker-bake.hcl -f docker-bake-release.hcl --push --set "kroki-*.platform=linux/arm64,linux/amd64"
smokeTests:
TAG=smoketests docker buildx bake --load --set "*.cache-from=$(CACHE_FROM)" --set "*.cache-to=$(CACHE_TO)"
@docker-compose --file "$(TESTS_DIR)/docker-compose.yaml" up --build --detach \
&& echo \
&& docker-compose --file "$(TESTS_DIR)/docker-compose.yaml" ps \
&& echo \
&& "$(TESTS_DIR)/wait-for-it.sh" localhost:8000 --timeout="$(COMPOSE_TIMEOUT)" \
&& echo \
&& echo 'Waiting for the containers'\'' services to be available... ($(SERVICES_TIMEOUT) seconds)' \
&& sleep "$(SERVICES_TIMEOUT)" \
&& npm test \
&& docker-compose -f "$(TESTS_DIR)/docker-compose.yaml" stop
installJavaScriptDependencies:
npm i --prefix bpmn
npm run prestart --prefix bpmn
npm i --prefix bytefield
npm i --prefix dbml
npm i --prefix diagrams.net
npm i --prefix excalidraw
npm run prestart --prefix excalidraw
npm i --prefix mermaid
npm run prestart --prefix mermaid
npm i --prefix nomnoml
npm i --prefix vega
npm i --prefix wavedrom