Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Usage:
  2. # make # Show this help to know which commands can run
  3. # make clean suite=<suite test> # Will Clean the environment of previous runs of a specific suite.
  4. # make build suite=<suite test> # Will Build the GeoServer docker image of a specific suite.
  5. # make suite=<suite test> # Will Run the specific test suite via a teamengine container.
  6. .DEFAULT_GOAL := help
  7. .PHONY = help
  8. suite =
  9. war_url = "https://build.geoserver.org/geoserver/main/geoserver-main-latest-war.zip"
  10. help:
  11. @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
  12. clean: ## Will Clean the Environment of previous runs.
  13. @echo Cleaning up previous runs
  14. docker-compose down --remove-orphans --rmi all -v
  15. docker-compose rm -vfs
  16. @echo Cleanning the previous logs.
  17. rm -Rf logs/*
  18. build: $(suite) ## Will Build the GeoServer Docker Image for the Environment.
  19. @echo Build the GeoServer Docker Image
  20. docker-compose -f docker-compose.yml -f ./$(suite)/docker-compose.override.yml \
  21. build --build-arg GEOSERVER_WEBAPP_SRC=${war_url} geoserver
  22. version: $(suite) ## Will give the version of the GeoServer on the current docker.
  23. @echo Getting the GeoServer version.
  24. docker run -i ogccite/geoserver:$(suite) bash -c 'cd /usr/local/tomcat/webapps/ && if [ -f geoserver.war ]; then unzip -q geoserver.war; cat META-INF/MANIFEST.MF; else cat META-INF/MANIFEST.MF; fi'
  25. test: $(suite) | version ## Will running the Suite test with teamengine.
  26. @echo running the Suite test with teamengine
  27. docker-compose -f docker-compose.yml -f ./$(suite)/docker-compose.override.yml \
  28. up --force-recreate --exit-code-from teamengine teamengine
  29. webUI: ## Will running the Suite test with teamengine.
  30. @echo running the Suite test with teamengine webUI
  31. docker-compose -f docker-compose.yml -f ./interactive/docker-compose.override.yml \
  32. up --force-recreate --no-deps --exit-code-from teamengine teamengine