update to 1.1.3 build scripts
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
node_modules/*
|
node_modules/*
|
||||||
|
gitrev
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
.npm
|
||||||
|
.nvmrc
|
||||||
|
nodemon.json
|
||||||
app.js
|
app.js
|
||||||
**/js/*
|
**/js/*
|
||||||
|
|||||||
15
Dockerfile
15
Dockerfile
@@ -1,20 +1,23 @@
|
|||||||
FROM node:6.13.0 as app
|
FROM node:6.14.1 as app
|
||||||
|
|
||||||
COPY ./ /app
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN npm install
|
#wildcard as some files may not be in all repos
|
||||||
|
COPY package*.json npm-shrink*.json /app/
|
||||||
|
|
||||||
|
RUN npm install --quiet
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
|
||||||
RUN npm run compile:all
|
RUN npm run compile:all
|
||||||
|
|
||||||
FROM node:6.13.0
|
FROM node:6.14.1
|
||||||
|
|
||||||
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
|
||||||
ENTRYPOINT ["/bin/sh", "entrypoint.sh"]
|
ENTRYPOINT ["/bin/sh", "entrypoint.sh"]
|
||||||
|
|
||||||
CMD ["node","app.js"]
|
CMD ["node","app.js"]
|
||||||
|
|||||||
11
Makefile
11
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.0
|
# 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)
|
||||||
@@ -13,6 +13,7 @@ DOCKER_COMPOSE := BUILD_NUMBER=$(BUILD_NUMBER) \
|
|||||||
MOCHA_GREP=${MOCHA_GREP} \
|
MOCHA_GREP=${MOCHA_GREP} \
|
||||||
docker-compose ${DOCKER_COMPOSE_FLAGS}
|
docker-compose ${DOCKER_COMPOSE_FLAGS}
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f app.js
|
rm -f app.js
|
||||||
rm -rf app/js
|
rm -rf app/js
|
||||||
@@ -24,16 +25,18 @@ test: test_unit test_acceptance
|
|||||||
test_unit:
|
test_unit:
|
||||||
@[ ! -d test/unit ] && echo "clsi has no unit tests" || $(DOCKER_COMPOSE) run --rm test_unit
|
@[ ! -d test/unit ] && echo "clsi has no unit tests" || $(DOCKER_COMPOSE) run --rm test_unit
|
||||||
|
|
||||||
test_acceptance: test_clean # clear the database before each acceptance test run
|
test_acceptance: test_clean test_acceptance_pre_run # clear the database before each acceptance test run
|
||||||
@[ ! -d test/acceptance ] && echo "clsi has no acceptance tests" || $(DOCKER_COMPOSE) run --rm test_acceptance
|
@[ ! -d test/acceptance ] && echo "clsi 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
|
||||||
|
|
||||||
|
test_acceptance_pre_run:
|
||||||
|
@[ ! -f test/acceptance/scripts/pre-run ] && echo "clsi has no pre acceptance tests task" || $(DOCKER_COMPOSE) run --rm test_acceptance test/acceptance/scripts/pre-run
|
||||||
build:
|
build:
|
||||||
docker build --pull --tag quay.io/sharelatex/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) .
|
docker build --pull --tag gcr.io/csh-gcdm-test/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) .
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
docker push quay.io/sharelatex/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
docker push gcr.io/csh-gcdm-test/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
||||||
|
|
||||||
.PHONY: clean test test_unit test_acceptance test_clean build publish
|
.PHONY: clean test test_unit test_acceptance test_clean build publish
|
||||||
|
|||||||
BIN
bin/synctex
BIN
bin/synctex
Binary file not shown.
@@ -1,27 +1,28 @@
|
|||||||
# 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.0
|
# Version: 1.1.3
|
||||||
|
|
||||||
version: "2"
|
version: "2"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
test_unit:
|
test_unit:
|
||||||
image: quay.io/sharelatex/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: gcr.io/csh-gcdm-test/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
command: npm run test:unit:_run
|
command: npm run test:unit:_run
|
||||||
|
|
||||||
test_acceptance:
|
test_acceptance:
|
||||||
build: .
|
build: .
|
||||||
image: quay.io/sharelatex/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: gcr.io/csh-gcdm-test/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
extends:
|
extends:
|
||||||
file: docker-compose-config.yml
|
file: docker-compose-config.yml
|
||||||
service: ci
|
service: ci
|
||||||
environment:
|
environment:
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
MONGO_HOST: mongo
|
MONGO_HOST: mongo
|
||||||
|
POSTGRES_HOST: postgres
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
|
||||||
- mongo
|
- mongo
|
||||||
|
- redis
|
||||||
command: npm run test:acceptance:_run
|
command: npm run test:acceptance:_run
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
@@ -29,3 +30,4 @@ services:
|
|||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
image: mongo:3.4
|
image: mongo:3.4
|
||||||
|
|
||||||
|
|||||||
@@ -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.0
|
# Version: 1.1.3
|
||||||
|
|
||||||
version: "2"
|
version: "2"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
test_unit:
|
test_unit:
|
||||||
image: node:6.13.0
|
build: .
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
@@ -26,14 +26,15 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
MONGO_HOST: mongo
|
MONGO_HOST: mongo
|
||||||
|
POSTGRES_HOST: postgres
|
||||||
MOCHA_GREP: ${MOCHA_GREP}
|
MOCHA_GREP: ${MOCHA_GREP}
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
|
||||||
- mongo
|
- mongo
|
||||||
|
- redis
|
||||||
command: npm run test:acceptance
|
command: npm run test:acceptance
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
image: mongo:3.4
|
image: mongo:3.4
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,12 @@
|
|||||||
"execMap": {
|
"execMap": {
|
||||||
"js": "npm run start"
|
"js": "npm run start"
|
||||||
},
|
},
|
||||||
|
|
||||||
"watch": [
|
"watch": [
|
||||||
"app/coffee/",
|
"app/coffee/",
|
||||||
"app.coffee",
|
"app.coffee",
|
||||||
"config/"
|
"config/"
|
||||||
],
|
],
|
||||||
"ext": "coffee"
|
"ext": "coffee"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
"url": "https://github.com/sharelatex/clsi-sharelatex.git"
|
"url": "https://github.com/sharelatex/clsi-sharelatex.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile:app": "coffee $COFFEE_OPTIONS -o app/js -c app/coffee && coffee $COFFEE_OPTIONS -c app.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": "npm run compile:app && npm run compile:test:acceptance && npm run compile:test:smoke",
|
"compile": "npm run compile:app && npm run compile:test:acceptance && npm run compile:test:smoke",
|
||||||
"start": "npm run compile:app && node $NODE_APP_OPTIONS app.js",
|
"start": "npm run compile:app && node $NODE_APP_OPTIONS app.js",
|
||||||
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"test:acceptance": "npm run compile:app && npm run compile:acceptance_tests && npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
"test:acceptance": "npm run compile:app && npm run compile:acceptance_tests && npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:unit:_run": "mocha --recursive --exit --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 -- --grep=$MOCHA_GREP",
|
"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",
|
||||||
|
|||||||
Reference in New Issue
Block a user