-
Notifications
You must be signed in to change notification settings - Fork 1
/
Messaging-Makefile
56 lines (42 loc) · 2.33 KB
/
Messaging-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
ENV_FILE := .env
include ${ENV_FILE}
export $(shell sed 's/=.*//' ${ENV_FILE})
CURRENT_DIR = $(shell pwd)
IMAGE_REPO := 'quay.io/redhatdemo'
APP_VERSION := $(shell bash -c "xml sel -N ns='http://maven.apache.org/POM/4.0.0' -t -v '//ns:project/ns:version/text()' $(CURRENT_DIR)/pom.xml")
NATIVE_BULID_ARGS = -DskipTests -Dquarkus.native.native-image-xmx=6G -Dquarkus.native.container-build=true -Dquarkus.package.type=native package
.PHONY: start_docker
start_docker:
@./bin/start-docker.sh
format:
@mvn -Pall editorconfig:format
install_jars:
@mvn -Pall -DskipTests -Dquarkus.package.type=jar clean install
test:
mvn -P$(PROFILES) -DfailIfNoTests=false -DskipTests=false -Dquarkus.package.type=jar clean test -Dtest=$(TEST_FILTER)
native_test:
mvn -P$(PROFILES) -DfailIfNoTests=false -Dquarkus.native.native-image-xmx=6G -DskipTests=false -Dquarkus.package.type=native verify -Dtest=$(TEST_FILTER)
clean:
@mvn -Pall clean
common: start_docker
@mvn -Pcommon -Dquarkus.package.type=jar clean install
##################################################################
### Leaderboard Messaging
##################################################################
leaderboard-messaging/target/*-runner.jar:
@mvn -Pmessaging -DskipTests clean install
build: leaderboard-messaging/target/*-runner.jar
leaderboard-messaging/target/*-runner: build
@mvn -Pmessaging,native $(NATIVE_BULID_ARGS)
jvm_image_build_push: start_docker build
@docker build -t $(IMAGE_REPO)/2020-leaderboard-messaging:"$(APP_VERSION)-jar" -f leaderboard-messaging/Dockerfile.jvm leaderboard-messaging
@docker push $(IMAGE_REPO)/2020-leaderboard-messaging:"$(APP_VERSION)-jar"
@docker tag $(IMAGE_REPO)/2020-leaderboard-messaging:"$(APP_VERSION)-jar" $(IMAGE_REPO)/2020-leaderboard-messaging
@docker push $(IMAGE_REPO)/2020-leaderboard-messaging
native: leaderboard-messaging/target/*-runner
native_image_build_push: start_docker native
@docker build -t $(IMAGE_REPO)/2020-leaderboard-messaging:"$(APP_VERSION)-native" -f leaderboard-messaging/Dockerfile.native leaderboard-messaging
@docker tag $(IMAGE_REPO)/2020-leaderboard-messaging:"$(APP_VERSION)-native" $(IMAGE_REPO)/2020-leaderboard-messaging
@docker push $(IMAGE_REPO)/2020-leaderboard-messaging:"$(APP_VERSION)-native"
@docker push $(IMAGE_REPO)/2020-leaderboard-messaging
all: clean common start_docker jvm_image_build_push