Sfoglia il codice sorgente

[misc] update the build scripts to 1.3.5

Jakob Ackermann 6 anni fa
parent
commit
1341af04f5

+ 0 - 1
services/filestore/.dockerignore

@@ -5,7 +5,6 @@ gitrev
 .npm
 .nvmrc
 nodemon.json
-
 uploads/
 user_files/
 template_files/

+ 3 - 12
services/filestore/.eslintrc

@@ -1,7 +1,7 @@
 // this file was auto-generated, do not edit it directly.
 // instead run bin/update_build_scripts from
 // https://github.com/sharelatex/sharelatex-dev-environment
-// Version: 1.3
+// Version: 1.3.5
 {
   "extends": [
     "standard",
@@ -28,7 +28,7 @@
   "overrides": [
     {
       // Test specific rules
-      "files": ["**/test/*/src/**/*.js"],
+      "files": ["test/**/*.js"],
       "globals": {
         "expect": true
       },
@@ -53,18 +53,9 @@
         "mocha/prefer-arrow-callback": "error"
       }
     },
-    {
-      // Frontend test specific rules
-      "files": ["**/test/frontend/**/*.js"],
-      "globals": {
-        "expect": true,
-        "define": true,
-        "$": true
-      }
-    },
     {
       // Backend specific rules
-      "files": ["**/app/src/**/*.js"],
+      "files": ["app/**/*.js", "app.js", "index.js"],
       "rules": {
         // don't allow console.log in backend code
         "no-console": "error"

+ 1 - 1
services/filestore/.prettierrc

@@ -1,7 +1,7 @@
 # This file was auto-generated, do not edit it directly.
 # Instead run bin/update_build_scripts from
 # https://github.com/sharelatex/sharelatex-dev-environment
-# Version: 1.3
+# Version: 1.3.5
 {
   "semi": false,
   "singleQuote": true

+ 9 - 6
services/filestore/Dockerfile

@@ -1,11 +1,15 @@
 # This file was auto-generated, do not edit it directly.
 # Instead run bin/update_build_scripts from
 # https://github.com/sharelatex/sharelatex-dev-environment
-# Version: 1.3
+# Version: 1.3.5
 
-FROM node:10.19.0 as app
+FROM node:10.19.0 as base
 
 WORKDIR /app
+COPY install_deps.sh /app
+RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
+
+FROM base as app
 
 #wildcard as some files may not be in all repos
 COPY package*.json npm-shrink*.json /app/
@@ -16,12 +20,11 @@ COPY . /app
 
 
 
-FROM node:10.19.0
+FROM base
 
 COPY --from=app /app /app
-
-WORKDIR /app
-RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
+RUN mkdir -p uploads user_files template_files \
+&&  chown node:node uploads user_files template_files
 USER node
 
 CMD ["node", "--expose-gc", "app.js"]

+ 6 - 1
services/filestore/Makefile

@@ -1,7 +1,7 @@
 # This file was auto-generated, do not edit it directly.
 # Instead run bin/update_build_scripts from
 # https://github.com/sharelatex/sharelatex-dev-environment
-# Version: 1.3
+# Version: 1.3.5
 
 BUILD_NUMBER ?= local
 BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
@@ -33,9 +33,14 @@ test_unit:
 
 test_acceptance: test_clean test_acceptance_pre_run test_acceptance_run
 
+test_acceptance_debug: test_clean test_acceptance_pre_run test_acceptance_run_debug
+
 test_acceptance_run:
 	@[ ! -d test/acceptance ] && echo "filestore has no acceptance tests" || $(DOCKER_COMPOSE) run --rm test_acceptance
 
+test_acceptance_run_debug:
+	@[ ! -d test/acceptance ] && echo "filestore has no acceptance tests" || $(DOCKER_COMPOSE) run -p 127.0.0.9:19999:19999 --rm test_acceptance npm run test:acceptance -- --inspect=0.0.0.0:19999 --inspect-brk
+
 test_clean:
 	$(DOCKER_COMPOSE) down -v -t 0
 

+ 7 - 6
services/filestore/buildscript.txt

@@ -1,10 +1,11 @@
 filestore
---env-add=ENABLE_CONVERSIONS="true",USE_PROM_METRICS="true",AWS_S3_USER_FILES_BUCKET_NAME=fake_user_files,AWS_S3_TEMPLATE_FILES_BUCKET_NAME=fake_template_files,AWS_S3_PUBLIC_FILES_BUCKET_NAME=fake_public_files,AWS_S3_ENDPOINT=http://s3:9090,AWS_ACCESS_KEY_ID=fake,AWS_SECRET_ACCESS_KEY=fake
---dependencies=s3
---acceptance-creds=
---script-version=1.3
---node-version=10.19.0
+--public-repo=True
 --language=es
+--env-add=ENABLE_CONVERSIONS="true",USE_PROM_METRICS="true",AWS_S3_USER_FILES_BUCKET_NAME=fake_user_files,AWS_S3_TEMPLATE_FILES_BUCKET_NAME=fake_template_files,AWS_S3_PUBLIC_FILES_BUCKET_NAME=fake_public_files
+--node-version=10.19.0
+--acceptance-creds=
+--dependencies=s3
 --docker-repos=gcr.io/overleaf-ops
---public-repo=True
 --env-pass-through=
+--data-dirs=uploads,user_files,template_files
+--script-version=1.3.5

+ 7 - 6
services/filestore/docker-compose.ci.yml

@@ -1,9 +1,9 @@
 # This file was auto-generated, do not edit it directly.
 # Instead run bin/update_build_scripts from
 # https://github.com/sharelatex/sharelatex-dev-environment
-# Version: 1.3
+# Version: 1.3.5
 
-version: "2.1"
+version: "2.3"
 
 services:
   test_unit:
@@ -22,6 +22,10 @@ services:
       REDIS_HOST: redis
       MONGO_HOST: mongo
       POSTGRES_HOST: postgres
+      AWS_S3_ENDPOINT: http://s3:9090
+      AWS_S3_PATH_STYLE: 'true'
+      AWS_ACCESS_KEY_ID: fake
+      AWS_SECRET_ACCESS_KEY: fake
       MOCHA_GREP: ${MOCHA_GREP}
       NODE_ENV: test
       ENABLE_CONVERSIONS: "true"
@@ -29,9 +33,6 @@ services:
       AWS_S3_USER_FILES_BUCKET_NAME: fake_user_files
       AWS_S3_TEMPLATE_FILES_BUCKET_NAME: fake_template_files
       AWS_S3_PUBLIC_FILES_BUCKET_NAME: fake_public_files
-      AWS_S3_ENDPOINT: http://s3:9090
-      AWS_ACCESS_KEY_ID: fake
-      AWS_SECRET_ACCESS_KEY: fake
     depends_on:
       s3:
         condition: service_healthy
@@ -49,6 +50,6 @@ services:
   s3:
     image: adobe/s3mock
     environment:
-      - initialBuckets=fake_user_files,fake_template_files,fake_public_files
+      - initialBuckets=fake_user_files,fake_template_files,fake_public_files,bucket
     healthcheck:
       test: ["CMD", "curl", "-f", "http://localhost:9090"]

+ 13 - 8
services/filestore/docker-compose.yml

@@ -1,13 +1,15 @@
 # This file was auto-generated, do not edit it directly.
 # Instead run bin/update_build_scripts from
 # https://github.com/sharelatex/sharelatex-dev-environment
-# Version: 1.3
+# Version: 1.3.5
 
-version: "2.1"
+version: "2.3"
 
 services:
   test_unit:
-    build: .
+    build:
+      context: .
+      target: base
     volumes:
       - .:/app
     working_dir: /app
@@ -18,7 +20,9 @@ services:
     user: node
 
   test_acceptance:
-    build: .
+    build:
+      context: .
+      target: base
     volumes:
       - .:/app
     working_dir: /app
@@ -27,6 +31,10 @@ services:
       REDIS_HOST: redis
       MONGO_HOST: mongo
       POSTGRES_HOST: postgres
+      AWS_S3_ENDPOINT: http://s3:9090
+      AWS_S3_PATH_STYLE: 'true'
+      AWS_ACCESS_KEY_ID: fake
+      AWS_SECRET_ACCESS_KEY: fake
       MOCHA_GREP: ${MOCHA_GREP}
       LOG_LEVEL: ERROR
       NODE_ENV: test
@@ -35,9 +43,6 @@ services:
       AWS_S3_USER_FILES_BUCKET_NAME: fake_user_files
       AWS_S3_TEMPLATE_FILES_BUCKET_NAME: fake_template_files
       AWS_S3_PUBLIC_FILES_BUCKET_NAME: fake_public_files
-      AWS_S3_ENDPOINT: http://s3:9090
-      AWS_ACCESS_KEY_ID: fake
-      AWS_SECRET_ACCESS_KEY: fake
     user: node
     depends_on:
       s3:
@@ -47,6 +52,6 @@ services:
   s3:
     image: adobe/s3mock
     environment:
-      - initialBuckets=fake_user_files,fake_template_files,fake_public_files
+      - initialBuckets=fake_user_files,fake_template_files,fake_public_files,bucket
     healthcheck:
       test: ["CMD", "curl", "-f", "http://localhost:9090"]

+ 0 - 5
services/filestore/install_deps.sh

@@ -7,8 +7,3 @@ apt-get update
 apt-get install ghostscript imagemagick optipng --yes
 
 rm -rf /var/lib/apt/lists/*
-
-mkdir /app/user_files/ /app/uploads/ /app/template_files/
-chown -R node:node /app/user_files
-chown -R node:node /app/uploads
-chown -R node:node /app/template_files