mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-02 09:25:47 +00:00
removed user temporarly, created make ci task
This commit is contained in:
parent
bd0a7c3557
commit
b86dc2623f
5 changed files with 16 additions and 35 deletions
|
@ -23,5 +23,5 @@ RUN useradd --user-group --create-home --home-dir /app --shell /bin/false app
|
|||
|
||||
RUN [ -e ./install_deps.sh ] && ./install_deps.sh
|
||||
|
||||
USER app
|
||||
# USER app
|
||||
CMD ["node","app.js"]
|
||||
|
|
22
services/clsi/Jenkinsfile
vendored
22
services/clsi/Jenkinsfile
vendored
|
@ -9,27 +9,9 @@ pipeline {
|
|||
}
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
stage('CI') {
|
||||
steps {
|
||||
sh 'make build'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Unit Tests') {
|
||||
steps {
|
||||
sh 'DOCKER_COMPOSE_FLAGS="-f docker-compose.ci.yml" make test_unit'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Acceptance Tests') {
|
||||
steps {
|
||||
sh 'DOCKER_COMPOSE_FLAGS="-f docker-compose.ci.yml" up --build test_acceptance'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Package and publish build') {
|
||||
steps {
|
||||
sh 'make publish'
|
||||
sh 'make ci'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,10 +28,22 @@ test_acceptance: test_clean # clear the database before each acceptance test run
|
|||
|
||||
test_clean:
|
||||
$(DOCKER_COMPOSE) down -t 0
|
||||
|
||||
build:
|
||||
docker build --pull --tag quay.io/sharelatex/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) .
|
||||
|
||||
publish:
|
||||
docker push quay.io/sharelatex/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
||||
|
||||
ci:
|
||||
# On the CI server, we want to run our tests in the image that we
|
||||
# have built for deployment, which is what the docker-compose.ci.yml
|
||||
# override does.
|
||||
PROJECT_NAME=$(PROJECT_NAME) \
|
||||
BRANCH_NAME=$(BRANCH_NAME) \
|
||||
BUILD_NUMBER=$(BUILD_NUMBER) \
|
||||
DOCKER_COMPOSE_FLAGS="-f docker-compose.ci.yml" \
|
||||
$(MAKE) build test
|
||||
|
||||
|
||||
.PHONY: clean test test_unit test_acceptance test_clean build publish
|
||||
|
|
|
@ -12,17 +12,10 @@ services:
|
|||
|
||||
test_acceptance:
|
||||
build: .
|
||||
image: quay.io/sharelatex/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||
extends:
|
||||
file: docker-compose-config.yml
|
||||
service: ci
|
||||
environment:
|
||||
REDIS_HOST: redis
|
||||
MONGO_HOST: mongo
|
||||
depends_on:
|
||||
- redis
|
||||
- mongo
|
||||
entrypoint: npm run test:acceptance:_run
|
||||
entrypoint: npm run test:acceptance
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
|
|
|
@ -21,12 +21,6 @@ services:
|
|||
extends:
|
||||
file: docker-compose-config.yml
|
||||
service: dev
|
||||
environment:
|
||||
REDIS_HOST: redis
|
||||
MONGO_HOST: mongo
|
||||
depends_on:
|
||||
- redis
|
||||
- mongo
|
||||
entrypoint: npm run test:acceptance
|
||||
|
||||
redis:
|
||||
|
|
Loading…
Reference in a new issue