project of gitlab-runner gateway
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.6KB

  1. .PHONY: build run debug docker-build docker-run docker-graal-introspect docker-graal-build docker-graal-run
  2. NATIVE_VERSION=1.0.0
  3. start-runner:
  4. docker run -d --name gitlab-runner --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock \
  5. -v gitlab-runner-config:/etc/gitlab-runner gitlab/gitlab-runner:latest
  6. build:
  7. ./mvnw compile
  8. run:
  9. ./mvnw spring-boot:run
  10. debug:
  11. ./mvnw spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
  12. docker-build:
  13. ./mvnw compile com.google.cloud.tools:jib-maven-plugin:2.5.2:build
  14. docker-run:
  15. docker run --rm -d -p 8080:8080 docker.registry:5000/wikiproject:latest
  16. # this java agent for instrospect java reflexion call is not mandatory, instead spring boot maven plugin do all stuff for us
  17. docker-graal-introspect: RUN_PORT=8080
  18. docker-graal-introspect:
  19. docker build -f ./Dockerfile-agent -t docker.registry:5000/wikiproject-native-introspect .
  20. docker run -p 8080:$(RUN_PORT) -e RUN_PORT=$(RUN_PORT) --rm -v $$(pwd):/build docker.registry:5000/wikiproject-native-introspect
  21. docker-graal-build: NATIVE_VERSION=latest
  22. docker-graal-build:
  23. docker build -t docker.registry:5000/wikiproject-native:$(NATIVE_VERSION) .
  24. docker-graal-release:
  25. docker tag docker.registry:5000/wikiproject-native:latest docker.registry:5000/wikiproject-native:$(NATIVE_VERSION)
  26. docker-graal-push:
  27. docker push docker.registry:5000/wikiproject-native:$(NATIVE_VERSION)
  28. docker-graal-run: RUN_PORT=8080
  29. docker-graal-run:
  30. echo "$(firstword $(MAKECMDGOALS))"
  31. docker run --rm -p 8080:$(RUN_PORT) docker.registry:5000/wikiproject-native --server.port=$(RUN_PORT)