-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
64 lines (50 loc) · 2.26 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
DOCKER_REPO="geoservercloud/geoserver-acl"
#default target
build: install build-image test-examples
#build, test, and install all modules, including the API server and GeoServer plugin
install:
./mvnw clean install
# build, test, and install, the geoserver plugin and its dependencies
plugin:
./mvnw clean install -pl :gs-acl-client-plugin --also-make -ntp
# plugin-test-* run with -Denforcer.skip for the CI build
# to execute it with both Java 11 and 17, ensuring the plugin is compatible with
# the minimum java version required by GeoServer
plugin-test-gs-dev:
./mvnw -Denforcer.skip -P gs_dev verify -pl :gs-acl-client-plugin -am -ntp
plugin-test-gs-stable:
./mvnw -Denforcer.skip -P gs_stable verify -pl :gs-acl-client-plugin -am -ntp
plugin-test-gs-maintenance:
./mvnw -Denforcer.skip -P gs_maintenance verify -pl :gs-acl-client-plugin -am -ntp
lint:
./mvnw sortpom:verify fmt:check -ntp
format:
./mvnw sortpom:sort fmt:format -ntp
package:
./mvnw clean package -DskipTests -U -ntp -T4
test:
./mvnw verify -ntp -T4
test-examples:
./mvnw install -DskipTests -ntp -pl :gs-acl-testcontainer
./mvnw verify -ntp -T4 -f examples/
# Make sure `make package` was run before if anything changed since the last build
# Consecutive COPY commands in Dockerfile fail on github runners
# Added "DOCKER_BUILDKIT=1" as a temporary fix
# more discussion on the same issue:
# https://github.com/moby/moby/issues/37965
# https://github.community/t/attempting-to-build-docker-image-with-copy-from-on-actions/16715
# https://stackoverflow.com/questions/51115856/docker-failed-to-export-image-failed-to-create-image-failed-to-get-layer
build-image:
@VERSION=`./mvnw help:evaluate -q -DforceStdout -Dexpression=project.version` && \
DOCKER_BUILDKIT=1 docker build -t $(DOCKER_REPO):$${VERSION} src/artifacts/api/
push-image:
@VERSION=`./mvnw help:evaluate -q -DforceStdout -Dexpression=project.version` && \
docker push $(DOCKER_REPO):$${VERSION}
deploy:
./mvnw clean package \
-pl :gs-acl-client-plugin -pl :gs-acl-api-client-spring6 -pl :gs-acl-testcontainer \
--also-make -ntp -T2 -fae -Dfmt.skip -U -DskipTests
./mvnw deploy \
-s $$MAVEN_SETTINGS \
-pl :gs-acl-client-plugin -pl :gs-acl-api-client-spring6 -pl :gs-acl-testcontainer \
--also-make -ntp -T2 -fae -Dfmt.skip -U -DskipTests