Merge branch 'ho-docker' of github.com:sharelatex/docstore-sharelatex into ho-docker

This commit is contained in:
Henry Oswald 2018-09-28 11:50:38 +01:00
commit ed4e2775c2
6 changed files with 19 additions and 14 deletions

View file

@ -2,7 +2,7 @@ String cron_string = BRANCH_NAME == "master" ? "@daily" : ""
pipeline {
agent any
triggers {
pollSCM('* * * * *')
cron(cron_string)
@ -24,12 +24,11 @@ pipeline {
stage('Acceptance Tests') {
steps {
withCredentials([usernamePassword(credentialsId: 'S3_DOCSTORE_TEST_AWS_KEYS', passwordVariable: 'AWS_SECRET_ACCESS_KEY', usernameVariable: 'AWS_ACCESS_KEY_ID')]) {
sh 'AWS_BUCKET="sl-doc-archive-testing" AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY DOCKER_COMPOSE_FLAGS="-f docker-compose.ci.yml" make test_acceptance'
sh 'AWS_BUCKET="sl-acceptance-tests" AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY DOCKER_COMPOSE_FLAGS="-f docker-compose.ci.yml" make test_acceptance'
}
}
}
stage('Package and publish build') {
steps {
sh 'make publish'

View file

@ -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.1.3
# Version: 1.1.4
BUILD_NUMBER ?= local
BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
@ -14,7 +14,7 @@ DOCKER_COMPOSE := BUILD_NUMBER=$(BUILD_NUMBER) \
AWS_BUCKET=${AWS_BUCKET} \
AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \
AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \
docker-compose ${DOCKER_COMPOSE_FLAGS}
docker-compose ${DOCKER_COMPOSE_FLAGS}
clean:

View file

@ -1,14 +1,13 @@
http = require('http')
http.globalAgent.maxSockets = 300
module.exports = Settings =
Settings =
internal:
docstore:
port: 3016
host: process.env['LISTEN_ADDRESS'] or "localhost"
mongo:
url: "#{process.env['MONGO_CONNECTION_STRING'] or 'mongodb://127.0.0.1/sharelatex'}"
mongo:{}
docstore:
healthCheck:
@ -16,10 +15,17 @@ module.exports = Settings =
max_doc_length: 2 * 1024 * 1024 # 2mb
if process.env['MONGO_CONNECTION_STRING']?
Settings.mongo.url = process.env['MONGO_CONNECTION_STRING']
else if process.env['MONGO_HOST']?
Settings.mongo.url = "mongodb://#{process.env['MONGO_HOST']}/sharelatex"
else
Settings.mongo.url = "mongodb://127.0.0.1/sharelatex"
if process.env['AWS_ACCESS_KEY_ID']? and process.env['AWS_SECRET_ACCESS_KEY']? and process.env['AWS_BUCKET']?
Settings.docstore.s3 =
key: process.env['AWS_ACCESS_KEY_ID']
secret: process.env['AWS_SECRET_ACCESS_KEY']
bucket: process.env['AWS_BUCKET']
console.log "SETTINGS"
console.log Settings.docstore.s3
module.exports = Settings

View file

@ -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.1.3
# Version: 1.1.4
version: "2"

View file

@ -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.1.3
# Version: 1.1.4
version: "2"
@ -25,8 +25,8 @@ services:
REDIS_HOST: redis
MONGO_HOST: mongo
POSTGRES_HOST: postgres
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_BUCKET: ${AWS_BUCKET}
MOCHA_GREP: ${MOCHA_GREP}
user: node

View file

@ -12,7 +12,7 @@
"start": "npm run compile:app && node $NODE_APP_OPTIONS app.js",
"test:acceptance:_run": "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY AWS_BUCKET=$AWS_BUCKET AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID 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:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
"test:unit:_run": "mocha --recursive --reporter spec --exit $@ test/unit/js",
"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:acceptance_tests": "[ ! -e test/acceptance/coffee ] && echo 'No acceptance tests to compile' || coffee -o test/acceptance/js -c test/acceptance/coffee",