2023-11-23 05:40:13 -05:00
all : test -e 2e
2024-05-30 03:12:56 -04:00
# We are updating the docker compose config via the host-admin service.
# The host-admin service is running inside docker and has its own file-system layout.
# We need to have both file-system layouts agree on the path for the docker compose project.
# 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).
export PWD = $( shell pwd )
2024-06-04 09:22:56 -04:00
export TEX_LIVE_DOCKER_IMAGE ?= quay.io/sharelatex/texlive-full:2023.1
export ALL_TEX_LIVE_DOCKER_IMAGES ?= quay.io/sharelatex/texlive-full:2023.1,quay.io/sharelatex/texlive-full:2022.1
2024-06-11 07:01:21 -04:00
export IMAGE_TAG_PRO ?= quay.io/sharelatex/sharelatex-pro:latest
2024-07-10 10:00:41 -04:00
export CYPRESS_SHARD ?=
export COMPOSE_PROJECT_NAME ?= test
2024-05-30 03:13:24 -04:00
2024-07-29 05:56:56 -04:00
test-e2e-native : build_mailtrap
2024-06-17 07:05:06 -04:00
docker compose -f docker-compose.yml -f docker-compose.native.yml up --build --no-log-prefix sharelatex host-admin -d
2024-07-01 11:02:37 -04:00
CYPRESS_ADMIN_CLIENT_URL = 'http://localhost:8081' CYPRESS_GIT_BRIDGE_PUBLIC_HOST = 'localhost' CYPRESS_SAML_PUBLIC_HOST = 'localhost:8082' CYPRESS_OVERLEAF_PUBLIC_HOST = 'localhost:8082' npm run cypress:open
2024-06-17 07:05:06 -04:00
2023-11-23 05:40:13 -05:00
test-e2e :
2024-05-30 03:12:56 -04:00
docker compose up --build --no-log-prefix --exit-code-from= e2e e2e
2023-11-23 05:40:13 -05:00
2024-07-29 05:56:56 -04:00
test-e2e-open : build_mailtrap
2024-05-30 03:12:56 -04:00
docker compose up --build --no-log-prefix --exit-code-from= e2e-open e2e-open
clean :
docker compose down --volumes --timeout 0
2024-07-10 10:00:41 -04:00
prefetch : prefetch_default
prefetch_default : prefetch_default_compose
prefetch_default_compose :
docker compose pull e2e mongo redis
prefetch_default : prefetch_default_compose_build
prefetch_default_compose_build :
2024-07-29 05:56:56 -04:00
docker compose build host-admin
2024-07-10 10:00:41 -04:00
prefetch : prefetch_custom
prefetch_custom : prefetch_custom_compose_pull
prefetch_custom_compose_pull :
docker compose pull saml ldap
prefetch_custom : prefetch_custom_texlive
prefetch_custom_texlive :
2024-05-30 03:13:24 -04:00
echo -n " $$ ALL_TEX_LIVE_DOCKER_IMAGES " | xargs -d, -I% \
sh -exc 'tag=%; re_tag=quay.io/sharelatex/$${tag#*/}; docker pull $$tag; docker tag $$tag $$re_tag'
2024-07-10 10:00:41 -04:00
prefetch_custom : prefetch_old
prefetch_old :
2024-06-11 07:01:21 -04:00
docker pull $( IMAGE_TAG_PRO:latest= 4.2)
docker pull $( IMAGE_TAG_PRO:latest= 5.0.1-RC1)
docker pull $( IMAGE_TAG_PRO:latest= 5.0)
2024-02-08 11:51:26 -05:00
2024-07-29 05:56:56 -04:00
# Google Cloud Build runs on a very ancient Docker version that does not support the subdir flag.
# Use services -> mailtrap -> build -> context = https://github.com/dbck/docker-mailtrap.git#v1.5.0:build in docker-compose.yml eventually.
prefetch_default_compose_build : build_mailtrap
build_mailtrap :
git clone https://github.com/dbck/docker-mailtrap.git || true && cd docker-mailtrap && git checkout v1.5.0
docker build -t mailtrap docker-mailtrap/build
2024-02-08 11:51:26 -05:00
.PHONY : test -e 2e test -e 2e -open