Commit graph

19 commits

Author SHA1 Message Date
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
Nate Stemen
2f03bb6015 adding file completer 2017-11-21 11:26:44 -05:00
Shane Kilkelly
ff7955dfdb Update labels when docs are uploaded or removed 2017-06-08 15:12:18 +01:00
Henry Oswald
9a8ee112a5 null check path.split
https://sentry.io/sharelatex-1/sl-web-client-prod/issues/202702369/
2017-03-17 10:35:07 +00:00
James Allen
0a6a6c3c28 Keep files ordered in overview panel in the same was as the file tree 2016-12-09 16:17:28 +00:00
James Allen
71ca358e0e Show confirmation if upload will overwrite files 2016-02-24 16:37:03 +00:00
James Allen
938b042f8c Include selected entity in multi selection on first click 2016-02-10 15:59:51 +00:00
James Allen
d47f6801c2 Don't trigger delete event on move to avoid switching to root document 2016-02-10 15:26:26 +00:00
James Allen
506d2224aa Allow Cmd+Clicking to multi select entries in the file tree 2016-02-09 15:13:58 +00:00
Henry Oswald
67f4929e49 null check on loadRootFolder 2015-02-18 22:31:45 +00:00
Henry Oswald
2c3b19e43d null check on deleting entry from scope 2015-02-18 22:28:02 +00:00
James Allen
753a80ada5 Navigate away from deleted docs. Closes #141 2015-02-03 13:51:56 +00:00
Henry Oswald
28b1e6bfe5 added client side checks on how long project or entity names can be
150 chars should be safely under the 1024 bytes mongo index limit
2014-10-07 11:08:08 +01:00
James Allen
894024ba29 Don't allow folders to be moved into their child folders 2014-08-22 14:38:52 +01:00
James Allen
f886f19429 Keep root doc list in sync with file tree updates 2014-07-31 13:04:55 +01:00
James Allen
2b85ebf8ec Allow root doc to be set 2014-07-21 15:09:19 +01:00
James Allen
c93902345a Remove all console.log debug statements 2014-07-09 16:18:09 +01:00
James Allen
d9c8e5c1c2 Deleted docs null check 2014-07-09 15:01:33 +01:00
James Allen
8ed03694c3 Add missing files 2014-07-08 12:02:26 +01:00