-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
41 lines (36 loc) · 1.2 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
HMILY_HOME := "."
REGISTRY ?= "docker.io"
REPOSITORY_PREF ?= "dromara/hmily"
ADMIN_REPOSITORY ?= "${REPOSITORY_PREF}-admin"
TAG ?= latest
VERSION ?= "1.0.2"
COMMIT_ID := $(shell git rev-parse HEAD)
default: build-hmily-admin-image
build-hmily-admin-image: build-hmily-admin
@echo "build-hmily-admin-image"
@docker buildx build --load \
-t ${REGISTRY}/${ADMIN_REPOSITORY}:${TAG} \
-f ${HMILY_HOME}/hmily-admin-dist/docker/Dockerfile \
--build-arg APP_NAME=hmily-admin-${VERSION}-admin-bin \
--label "commit.id=${COMMIT_ID}" \
${HMILY_HOME}/hmily-admin-dist
build-hmily-admin:
@echo "build hmily admin"
@mvn -am \
-pl hmily-admin-dist \
-Dmaven.javadoc.skip=true \
-Drat.skip=true \
-Djacoco.skip=true \
-DskipTests \
-Prelease \
clean package
publish-admin-image: build-hmily-admin
@echo "build and push hmily admin image"
@docker buildx build --push \
--platform=linux/arm64,linux/amd64 \
-t ${REGISTRY}/${ADMIN_REPOSITORY}:latest \
-t ${REGISTRY}/${ADMIN_REPOSITORY}:${VERSION} \
--build-arg APP_NAME=hmily-admin-${VERSION}-admin-bin \
--label "commit.id=${COMMIT_ID}" \
-f ${HMILY_HOME}/hmily-admin-dist/docker/Dockerfile \
${HMILY_HOME}/hmily-admin-dist