mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
updateded build scripts
This commit is contained in:
parent
c0058ac720
commit
b1c0abbd4d
6 changed files with 50 additions and 19 deletions
36
services/clsi/Jenkinsfile
vendored
36
services/clsi/Jenkinsfile
vendored
|
@ -9,9 +9,34 @@ pipeline {
|
|||
}
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
stage('Install') {
|
||||
agent {
|
||||
docker {
|
||||
image 'node:6.13.0'
|
||||
args "-v /var/lib/jenkins/.npm:/tmp/.npm -e HOME=/tmp"
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'make build'
|
||||
// we need to disable logallrefupdates, else git clones
|
||||
// during the npm install will require git to lookup the
|
||||
// user id which does not exist in the container's
|
||||
// /etc/passwd file, causing the clone to fail.
|
||||
sh 'git config --global core.logallrefupdates false'
|
||||
sh 'rm -rf node_modules'
|
||||
sh 'npm install && npm rebuild'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Compile') {
|
||||
agent {
|
||||
docker {
|
||||
image 'node:6.13.0'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'npm run compile:all'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +54,12 @@ pipeline {
|
|||
|
||||
stage('Package and publish build') {
|
||||
steps {
|
||||
sh 'make publish'
|
||||
sh 'echo ${BUILD_NUMBER} > build_number.txt'
|
||||
sh 'touch build.tar.gz' // Avoid tar warning about files changing during read
|
||||
sh 'tar -czf build.tar.gz --exclude=build.tar.gz --exclude-vcs .'
|
||||
withAWS(credentials:'S3_CI_BUILDS_AWS_KEYS', region:"${S3_REGION_BUILD_ARTEFACTS}") {
|
||||
s3Upload(file:'build.tar.gz', bucket:"${S3_BUCKET_BUILD_ARTEFACTS}", path:"${JOB_NAME}/${BUILD_NUMBER}.tar.gz")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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.0.3
|
||||
# Version: 1.1.0
|
||||
|
||||
BUILD_NUMBER ?= local
|
||||
BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
|
||||
|
@ -28,10 +28,5 @@ 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)
|
||||
|
||||
.PHONY: clean test test_unit test_acceptance test_clean build publish
|
||||
|
|
|
@ -1,17 +1,23 @@
|
|||
# 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.0.3
|
||||
# Version: 1.1.0
|
||||
|
||||
version: "2"
|
||||
|
||||
services:
|
||||
test_unit:
|
||||
image: quay.io/sharelatex/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||
image: node:6.13.0
|
||||
volumes:
|
||||
- .:/app
|
||||
working_dir: /app
|
||||
entrypoint: npm run test:unit:_run
|
||||
|
||||
test_acceptance:
|
||||
image: quay.io/sharelatex/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||
image: node:6.13.0
|
||||
volumes:
|
||||
- .:/app
|
||||
working_dir: /app
|
||||
environment:
|
||||
REDIS_HOST: redis
|
||||
MONGO_HOST: mongo
|
||||
|
|
|
@ -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.0.3
|
||||
# Version: 1.1.0
|
||||
|
||||
version: "2"
|
||||
|
||||
|
@ -14,12 +14,12 @@ services:
|
|||
entrypoint: npm run test:unit
|
||||
|
||||
test_acceptance:
|
||||
build: .
|
||||
image: node:6.13.0
|
||||
volumes:
|
||||
- .:/app
|
||||
working_dir: /app
|
||||
extends:
|
||||
file: docker-compose-overrides.yml
|
||||
file: docker-compose-config.yml
|
||||
service: dev
|
||||
environment:
|
||||
REDIS_HOST: redis
|
||||
|
|
|
@ -6,9 +6,9 @@ metadata:
|
|||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- port: 3009
|
||||
- port: 80
|
||||
protocol: TCP
|
||||
targetPort: 3009
|
||||
targetPort: 80
|
||||
selector:
|
||||
run: clsi
|
||||
---
|
||||
|
@ -26,12 +26,12 @@ spec:
|
|||
spec:
|
||||
containers:
|
||||
- name: clsi
|
||||
image: gcr.io/henry-terraform-admin/clsi:6e0c79688030117a9c27d0fc01d1271e6ac3dd3e
|
||||
image: gcr.io/henry-terraform-admin/clsi
|
||||
imagePullPolicy: Always
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: status
|
||||
port: 3009
|
||||
port: 80
|
||||
periodSeconds: 5
|
||||
initialDelaySeconds: 0
|
||||
failureThreshold: 3
|
||||
|
|
Loading…
Reference in a new issue