Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. all: test-e2e
  2. # We are updating the docker compose config via the host-admin service.
  3. # The host-admin service is running inside docker and has its own file-system layout.
  4. # We need to have both file-system layouts agree on the path for the docker compose project.
  5. # Notable the container labels com.docker.compose.project.working_dir and com.docker.compose.project.config_files need to match when creating containers from the docker host (how you started things) and from host-admin (how tests reconfigure the instance).
  6. export PWD = $(shell pwd)
  7. export TEX_LIVE_DOCKER_IMAGE ?= quay.io/sharelatex/texlive-full:2023.1
  8. export ALL_TEX_LIVE_DOCKER_IMAGES ?= quay.io/sharelatex/texlive-full:2023.1,quay.io/sharelatex/texlive-full:2022.1
  9. export IMAGE_TAG_PRO ?= quay.io/sharelatex/sharelatex-pro:latest
  10. test-e2e-native:
  11. docker compose -f docker-compose.yml -f docker-compose.native.yml up --build --no-log-prefix sharelatex host-admin -d
  12. CYPRESS_ADMIN_CLIENT_URL='http://localhost:8081' CYPRESS_GIT_BRIDGE_PUBLIC_HOST='localhost' npm run cypress:open
  13. test-e2e:
  14. docker compose up --build --no-log-prefix --exit-code-from=e2e e2e
  15. test-e2e-open:
  16. docker compose up --build --no-log-prefix --exit-code-from=e2e-open e2e-open
  17. clean:
  18. docker compose down --volumes --timeout 0
  19. prefetch:
  20. docker compose pull e2e mongo redis
  21. docker compose build
  22. echo -n "$$ALL_TEX_LIVE_DOCKER_IMAGES" | xargs -d, -I% \
  23. sh -exc 'tag=%; re_tag=quay.io/sharelatex/$${tag#*/}; docker pull $$tag; docker tag $$tag $$re_tag'
  24. docker pull $(IMAGE_TAG_PRO:latest=4.2)
  25. docker pull $(IMAGE_TAG_PRO:latest=5.0.1-RC1)
  26. docker pull $(IMAGE_TAG_PRO:latest=5.0)
  27. .PHONY: test-e2e test-e2e-open