gitlab-runner-gateway/Makefile

44 строки
1.6 KiB
Makefile

.PHONY: build run debug docker-build docker-run docker-graal-introspect docker-graal-build docker-graal-run
NATIVE_VERSION=1.0.0
start-runner:
docker run -d --name gitlab-runner --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock \
-v gitlab-runner-config:/etc/gitlab-runner gitlab/gitlab-runner:latest
build:
./mvnw compile
run:
./mvnw spring-boot:run
debug:
./mvnw spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
docker-build:
./mvnw compile com.google.cloud.tools:jib-maven-plugin:2.5.2:build
docker-run:
docker run --rm -d -p 8080:8080 docker.registry:5000/wikiproject:latest
# this java agent for instrospect java reflexion call is not mandatory, instead spring boot maven plugin do all stuff for us
docker-graal-introspect: RUN_PORT=8080
docker-graal-introspect:
docker build -f ./Dockerfile-agent -t docker.registry:5000/wikiproject-native-introspect .
docker run -p 8080:$(RUN_PORT) -e RUN_PORT=$(RUN_PORT) --rm -v $$(pwd):/build docker.registry:5000/wikiproject-native-introspect
docker-graal-build: NATIVE_VERSION=latest
docker-graal-build:
docker build -t docker.registry:5000/wikiproject-native:$(NATIVE_VERSION) .
docker-graal-release:
docker tag docker.registry:5000/wikiproject-native:latest docker.registry:5000/wikiproject-native:$(NATIVE_VERSION)
docker-graal-push:
docker push docker.registry:5000/wikiproject-native:$(NATIVE_VERSION)
docker-graal-run: RUN_PORT=8080
docker-graal-run:
echo "$(firstword $(MAKECMDGOALS))"
docker run --rm -p 8080:$(RUN_PORT) docker.registry:5000/wikiproject-native --server.port=$(RUN_PORT)