Henry Oswald 8 роки тому
батько
коміт
ba8a5cf3e1

+ 3 - 2
services/filestore/Dockerfile

@@ -2,7 +2,8 @@ FROM node:6.9.5 as app
 
 
 WORKDIR /app
 WORKDIR /app
 
 
-COPY package.json package-lock.json /app/
+#wildcard as some files may not be in all repos
+COPY package*.json npm-shrink*.json /app/
 
 
 RUN npm install --quiet
 RUN npm install --quiet
 
 
@@ -15,7 +16,7 @@ FROM node:6.9.5
 COPY --from=app /app /app
 COPY --from=app /app /app
 
 
 WORKDIR /app
 WORKDIR /app
-RUN ./install_deps.sh
+RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
 USER node
 USER node
 
 
 CMD ["node","app.js"]
 CMD ["node","app.js"]

+ 5 - 5
services/filestore/Makefile

@@ -1,7 +1,7 @@
 # This file was auto-generated, do not edit it directly.
 # This file was auto-generated, do not edit it directly.
 # Instead run bin/update_build_scripts from
 # Instead run bin/update_build_scripts from
 # https://github.com/sharelatex/sharelatex-dev-environment
 # https://github.com/sharelatex/sharelatex-dev-environment
-# Version: 1.1.1
+# Version: 1.1.3
 
 
 BUILD_NUMBER ?= local
 BUILD_NUMBER ?= local
 BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
 BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
@@ -22,11 +22,11 @@ clean:
 
 
 test: test_unit test_acceptance
 test: test_unit test_acceptance
 
 
-test_unit: 
-	@[ ! -d test/unit ] && echo "filestore has no unit tests" || $(DOCKER_COMPOSE) run --rm test_unit npm run test:unit -- ${MOCHA_ARGS}
+test_unit:
+	@[ ! -d test/unit ] && echo "filestore has no unit tests" || $(DOCKER_COMPOSE) run --rm test_unit
 
 
-test_acceptance:  test_clean test_acceptance_pre_run # clear the database before each acceptance test run
-	@[ ! -d test/acceptance ] && echo "filestore has no acceptance tests" || $(DOCKER_COMPOSE) run --rm test_acceptance npm run test:acceptance -- ${MOCHA_ARGS}
+test_acceptance: test_clean test_acceptance_pre_run # clear the database before each acceptance test run
+	@[ ! -d test/acceptance ] && echo "filestore has no acceptance tests" || $(DOCKER_COMPOSE) run --rm test_acceptance
 
 
 test_clean:
 test_clean:
 	$(DOCKER_COMPOSE) down -v -t 0
 	$(DOCKER_COMPOSE) down -v -t 0

+ 2 - 2
services/filestore/docker-compose.ci.yml

@@ -1,7 +1,7 @@
 # This file was auto-generated, do not edit it directly.
 # This file was auto-generated, do not edit it directly.
 # Instead run bin/update_build_scripts from
 # Instead run bin/update_build_scripts from
 # https://github.com/sharelatex/sharelatex-dev-environment
 # https://github.com/sharelatex/sharelatex-dev-environment
-# Version: 1.1.1
+# Version: 1.1.3
 
 
 version: "2"
 version: "2"
 
 
@@ -23,7 +23,7 @@ services:
       - redis
       - redis
     user: node
     user: node
     command: npm run test:acceptance:_run
     command: npm run test:acceptance:_run
-    
+
   redis:
   redis:
     image: redis
     image: redis
 
 

+ 2 - 2
services/filestore/docker-compose.yml

@@ -1,13 +1,13 @@
 # This file was auto-generated, do not edit it directly.
 # This file was auto-generated, do not edit it directly.
 # Instead run bin/update_build_scripts from
 # Instead run bin/update_build_scripts from
 # https://github.com/sharelatex/sharelatex-dev-environment
 # https://github.com/sharelatex/sharelatex-dev-environment
-# Version: 1.1.1
+# Version: 1.1.3
 
 
 version: "2"
 version: "2"
 
 
 services:
 services:
   test_unit:
   test_unit:
-    image: node:6.9.5
+    build: .
     volumes:
     volumes:
       - .:/app
       - .:/app
     working_dir: /app
     working_dir: /app

+ 2 - 2
services/filestore/package.json

@@ -8,9 +8,9 @@
   },
   },
   "scripts": {
   "scripts": {
     "test:acceptance:run": "mocha --recursive --reporter spec --timeout 15000  $@ test/acceptance/js",
     "test:acceptance:run": "mocha --recursive --reporter spec --timeout 15000  $@ test/acceptance/js",
-    "test:acceptance": "npm run compile:app && npm run compile:acceptance_tests && npm run test:acceptance:_run -- $@",
+    "test:acceptance": "npm run compile:app && npm run compile:acceptance_tests && npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
     "test:unit:run": "mocha --recursive --reporter spec $@ test/unit/js",
     "test:unit:run": "mocha --recursive --reporter spec $@ test/unit/js",
-    "test:unit": "npm run compile:app && npm run compile:unit_tests && npm run test:unit:_run -- $@",
+    "test:unit": "npm run compile:app && npm run compile:unit_tests && npm run test:unit:_run -- --grep=$MOCHA_GREP",
     "compile:unit_tests": "[ ! -e test/unit/coffee ] &&  echo 'No unit tests to compile' || coffee -o test/unit/js -c test/unit/coffee",
     "compile:unit_tests": "[ ! -e test/unit/coffee ] &&  echo 'No unit tests to compile' || coffee -o test/unit/js -c test/unit/coffee",
     "compile:acceptance_tests": "[ ! -e test/acceptance/coffee ] && echo 'No acceptance tests to compile' || coffee -o test/acceptance/js -c test/acceptance/coffee",
     "compile:acceptance_tests": "[ ! -e test/acceptance/coffee ] && echo 'No acceptance tests to compile' || coffee -o test/acceptance/js -c test/acceptance/coffee",
     "compile:app": "([ -e app/coffee ] && coffee $COFFEE_OPTIONS -o app/js -c app/coffee || echo 'No CoffeeScript folder to compile') && ( [ -e app.coffee ] && coffee $COFFEE_OPTIONS -c app.coffee || echo 'No CoffeeScript app to compile')",
     "compile:app": "([ -e app/coffee ] && coffee $COFFEE_OPTIONS -o app/js -c app/coffee || echo 'No CoffeeScript folder to compile') && ( [ -e app.coffee ] && coffee $COFFEE_OPTIONS -c app.coffee || echo 'No CoffeeScript app to compile')",