Commit graph

24 commits

Author SHA1 Message Date
Jessica Lawshe
b8ccb01f88 Merge pull request #17163 from overleaf/jel-dev-env-tests-mongo
[web] Use mongosh for tests in individual modules

GitOrigin-RevId: e2ca316434b39c348efcb0a289652931a6ce95e6
2024-02-19 09:04:32 +00:00
Jakob Ackermann
63520c7076 Merge pull request #16859 from overleaf/jpa-sharelatex-cleanup
[misc] ShareLaTeX cleanup - high impact

GitOrigin-RevId: 6dcce9b0f15e30f7afcf6d69c3df36a369f38120
2024-02-09 09:04:11 +00:00
Jakob Ackermann
bf7aed0e21 Merge pull request #14309 from overleaf/jpa-docker-compose
[web] use docker compose v2

GitOrigin-RevId: 12a262ddc1ca47faf1a3036ee6495c2052a6d5f2
2023-08-15 08:03:17 +00:00
Jakob Ackermann
46fb6f7c83 Merge pull request #12814 from overleaf/jpa-modules-rs-init
[web] initialize mongo replicaset for individual modules

GitOrigin-RevId: 9f8934ae58b21a99f466093617449f5e792d39cd
2023-04-27 08:05:40 +00:00
Jakob Ackermann
35538da3fa Merge pull request #7374 from overleaf/ae-docker-compose-log-level
Remove --log-level from DOCKER_COMPOSE_FLAGS

GitOrigin-RevId: dc301c33be82dc356be9c66e27b168a05edb9068
2022-04-05 12:21:45 +00:00
Eric Mc Sween
f3f0be5c56 Merge pull request #6211 from overleaf/em-code-sharing
Change directory layout in service containers

GitOrigin-RevId: 09ff19db2a123cbf7691d51e9ce9be6eee264287
2022-01-07 09:03:22 +00:00
Jakob Ackermann
fe4c48b7fb Merge pull request #4325 from overleaf/jpa-core-tests-in-saas-ce-pro
[misc] run core tests in SAAS/Server CE/Server Pro environment

GitOrigin-RevId: 6278ae1eb760a4c0c16da1b71efdde844764a526
2021-07-20 11:33:46 +00:00
Jakob Ackermann
411a12cb2d Merge pull request #4322 from overleaf/jpa-custom-base-config-for-tests
[misc] set up custom base config for acceptance tests

GitOrigin-RevId: bd49c705360488fd75c6ad311afd13f22f81de61
2021-07-20 11:33:41 +00:00
Alf Eaton
b777e958d4 Merge pull request #3926 from overleaf/ae-decaffeinate
Decaffeinate settings files

GitOrigin-RevId: e9eed42864d537bb1ff5a46c05d990c819afc8eb
2021-05-20 02:05:15 +00:00
Jakob Ackermann
1d95137e13 Merge pull request #4016 from overleaf/jpa-faster-ci-4288
[perf] faster CI

GitOrigin-RevId: 858c0c4947e41961dae35cb20e0fcc2e2f723787
2021-05-18 02:07:44 +00:00
Jakob Ackermann
2a8e2efe62 Merge pull request #2845 from overleaf/jpa-faster-web-ci
[misc] faster web ci

GitOrigin-RevId: bbd6b12040956f6b397c6ea4d8144e733299400b
2020-05-23 03:18:08 +00:00
Jakob Ackermann
35400de80a Merge pull request #2766 from overleaf/jpa-make-cleanup
[make] cleanup dc networks and fix frontend target

GitOrigin-RevId: abcd0d061bd924ff0ddf885d1a18b66ebcc7e8e5
2020-04-23 03:29:34 +00:00
Timothée Alby
d4fc866984 Merge pull request #2658 from overleaf/jpa-import-makefile-changes
[misc] import Makefile changes

GitOrigin-RevId: 6b19abd48cc40bdbaab6b0005711c9c2cca292f7
2020-03-10 04:14:29 +00:00
Eric Mc Sween
082f790fb6 Merge pull request #2180 from overleaf/as-clean-up-makefile
Clean up how tests are run in Makefile

GitOrigin-RevId: 9b52ead16392cca09bdf7edc4365f10dc468ccf2
2019-10-23 12:58:39 +00:00
Alasdair Smith
9cf73f965c Merge pull request #1440 from overleaf/as-amd-webpack
Bundle all frontend code with webpack

GitOrigin-RevId: 1bd93dad516c456fe1649193868e841e20459b0b
2019-10-16 10:36:21 +00:00
Alasdair Smith
0ca81de78c Merge pull request #1717 from overleaf/as-decaffeinate-backend
Decaffeinate backend

GitOrigin-RevId: 4ca9f94fc809cab6f47cec8254cacaf1bb3806fa
2019-05-29 09:32:21 +00:00
Henry Oswald
d55b38cc05 Merge pull request #1471 from sharelatex/ho-docker2
Move to docker image based builds

GitOrigin-RevId: 992aeaf69bfea4d1847a07c457575a63985d4407
2019-03-11 10:59:20 +00:00
James Allen
65c1943c63 Merge pull request #1249 from sharelatex/ja-single-process-acceptance-tests-2
Move to running acceptance tests in same process as web server

GitOrigin-RevId: 65757f0b57ac621cafb0066b5c5a7abb30333edd
2018-12-13 09:25:50 +00:00
Alasdair Smith
659242b457 Merge pull request #1037 from sharelatex/as-decaffeinate
Decaffeinate frontend

GitOrigin-RevId: 1c8c53dedecfe55f9936a13408df17b852f996de
2018-11-05 10:19:25 +00:00
Hayden Faulds
be0fd9a446 reduce container teardown timeout to 0 2018-06-05 11:30:48 +01:00
Alasdair Smith
19e0aab49c Fix module compile_full failing if module don't have app/coffee 2018-03-26 14:15:02 +01:00
Alasdair Smith
96b1d8c812 Compile frontend tests into web test directory and include module ES tests in karma 2018-03-23 12:37:47 +00:00
Alasdair Smith
fe65137c05 Check app/coffee existence before compiling 2018-03-23 12:34:11 +00:00
James Allen
662122bb1c CI and local dev environment improvements
The need for this became very noticeable due to the slowness of filesystem access in docker-in-mac, with a full compile taking over a minute for me in docker. Using make to introduce incremental compile makes this near instantaneous outside of docker (if only a few files have changed), and quick enough inside docker.

With incremental compile via make, it compiles quickly enough that re-compiling and restarting the web service automatically when backend files change is quick enough now. This is how the service is run via docker-compose in https://github.com/sharelatex/sharelatex-dev-environment, so it shouldn't be necessary to manually restart the container each time a coffee file changes.

At the moment Jenkins pull web modules in via the GitSCM plugin, but I believe this is creating a dependency in Jenkins, where any commits to any of the modules causes all of the web branches to rebuild. By doing it via our own scripts we can hopefully avoid this. It also creates a build process which is reproducible locally.

**Note that at the moment in this PR all modules pull from `ja-dockerize-dev` branches, but these should be merged first, and this PR updated to point to the master branches before merging**. This is necessary for other changes to build process/docker-compose workflow.

As well as a Makefile for web, there is now a `Makefile.module`. This is copied into each module directory by the top-level Makefile, and is written in a way to be flexible and support unit tests, acceptance tests, front-end js for the ide and main, and the modules `app/coffee` directory, while allowing modules to have some of these missing (not all modules have e.g. acceptance tests, or front-end JS). This will allows us to refine the build process in future, without needing to update the Makefile in each module repo separately (I found this to be a painful part of this development).

This makes web compatible with the docker-compose workflow at https://github.com/sharelatex/sharelatex-dev-environment, where each service is running in its own docker container, with networking managed by docker.

Previously the Makefile was set up to run unit tests in docker with `make unit_tests`. This now just runs them natively. In the CI, they are run in docker anyway (all steps in Jenkins are), and locally, they run fine natively with `npm run test:unit`, or can be run in docker via https://github.com/sharelatex/sharelatex-dev-environment with `bin/run web_sl npm run test:unit`.

Previously we did a lot of juggling with only mounting source files (coffee, less, etc) into the docker container for acceptance tests. This was to avoid creating root owned files if the whole directory was mounted. Now instead the whole web directory is mounted read-only, with the compilation step done outside of the container before running the tests.

This allows the host and container to share the `node_modules` folder as well, which avoids needing to `npm install` twice on the CI box, and should speed up the build by a few minutes.

On macOS, this would cause a problem with compiled modules if you tried to use the same `node_modules` to run the app natively. However, if running via docker-compose in https://github.com/sharelatex/sharelatex-dev-environment, this is no longer a problem.
2018-01-15 09:36:41 +00:00