Commit graph

36 commits

Author SHA1 Message Date
Hayden Faulds
99ec132a1f update commit statuses in Jenkins pipeline 2018-07-12 15:40:42 +01:00
Hayden Faulds
5616a91a9b strip whitespace 2018-07-11 13:58:18 +01:00
James Allen
dc724eae92 Try with parallel tests 2018-07-10 16:42:52 +01:00
hugh-obrien
d1756436e8 compile react in production mode 2018-05-11 15:34:22 +01:00
Alasdair Smith
cba07f79ee Run linting on CI 2018-02-23 11:44:43 +00:00
Alasdair Smith
8da5c535ec Run frontend unit tests in separate unit tests as they spawn their own docker containers 2018-02-20 14:01:50 +00:00
Hayden Faulds
29018d5af6 run make clean before compile_full on CI 2018-02-12 13:34:00 +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
James Allen
b0812864ac Clean up CI output 2017-12-19 13:58:47 +00:00
James Allen
d7a26e27e5 Run front end tests in CI 2017-12-19 13:58:47 +00:00
James Allen
b51ee7ea7e Point track-changes-web-module back at master 2017-12-04 09:22:47 +00:00
James Allen
e895a495d6 Move make clean step to before compile 2017-12-01 10:49:00 +00:00
James Allen
65e44d4770 Clean up old docker-shared.yml before running tests 2017-12-01 09:31:22 +00:00
James Allen
7efef12981 Fix Jenkinsfile syntax 2017-11-27 17:10:58 +00:00
James Allen
d9d7c96958 Get module unit tests running inside Docker as well as main tests 2017-11-27 17:10:58 +00:00
James Allen
fbf8cc2d03 Run acceptance tests via docker compose 2017-11-27 17:10:58 +00:00
Hayden Faulds
19d9aafbbd use release of SL acceptance-test-runner rather then fork 2017-11-23 10:39:30 +00:00
Hayden Faulds
e54e2c8328 fix acceptance tests 2017-11-23 10:39:30 +00:00
Hayden Faulds
5cdddc7d0e debugging output if acceptance tests fail on CI 2017-11-23 10:39:21 +00:00
Hayden Faulds
09964cfe95 compile acceptance tests 2017-11-23 10:38:55 +00:00
Joe Green
2c4d01ebde only build master periodically 2017-11-08 13:40:20 +00:00
Shane Kilkelly
5d0dd6ffc9 Pin the track-changes module to the sk-unlisted-projects branch 2017-11-06 10:47:24 +00:00
Joe Green
67b13d2583 Update Jenkinsfile 2017-10-16 14:07:49 +01:00
Joe Green
38b3626014 Try email only on master branch (#47) 2017-10-11 15:21:21 +01:00
James Allen
24dd89bc38 Adjust wording 2017-10-09 14:23:05 +01:00
James Allen
8c9ad69dfe Always npm install translations from master 2017-10-09 14:22:04 +01:00
James Allen
afe40809ad Add in account merge module to build step 2017-10-04 14:57:08 +01:00
Joe Green
3c9c94f3c2 release number (#32)
Replace release number in pug template for sentry
2017-09-29 10:37:39 +01:00
James Allen
ffc35d9d65 Include docker command directly because node isn't available in Jenkins 2017-09-27 10:50:34 +02:00
James Allen
1502da85cf Set up acceptance tests to run in docker container 2017-09-27 10:37:20 +02:00
James Allen
d0ce22b0f8 Add in overleaf-integration module to build 2017-09-18 11:30:43 +02:00
James Allen
a0ac11eb0d Actually push to master branch 2017-09-18 11:11:33 +02:00
James Allen
f0092bc85a Push master branch to public repo after successful build
Note that this has to happen outside of the docker container to
work around issues with git and user ids, so we've had to
modify the pipeline to explicitly run the steps inside docker
as needed.
2017-09-18 11:10:22 +02:00
Joe Green
404749acaf disableConcurrentBuilds 2017-09-04 16:02:16 +01:00
Joe Green
144a13462e build.txt 2017-09-04 14:58:13 +01:00
Joe Green
d184c9c555 Add Jenkinsfile
* added Jenkins file

* Use new build process

* comment out post stage

* use checkout step

* install grunt before unit tests

* swap hardcoded config for env vars
2017-08-16 10:43:48 +01:00