Bump buildscripts from 1.1.11 to 1.1.20
This commit is contained in:
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@@ -48,8 +48,11 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Package and publish build') {
|
stage('Package and docker push') {
|
||||||
steps {
|
steps {
|
||||||
|
sh 'echo ${BUILD_NUMBER} > build_number.txt'
|
||||||
|
sh 'touch build.tar.gz' // Avoid tar warning about files changing during read
|
||||||
|
sh 'DOCKER_COMPOSE_FLAGS="-f docker-compose.ci.yml" make tar'
|
||||||
|
|
||||||
withCredentials([file(credentialsId: 'gcr.io_overleaf-ops', variable: 'DOCKER_REPO_KEY_PATH')]) {
|
withCredentials([file(credentialsId: 'gcr.io_overleaf-ops', variable: 'DOCKER_REPO_KEY_PATH')]) {
|
||||||
sh 'docker login -u _json_key --password-stdin https://gcr.io/overleaf-ops < ${DOCKER_REPO_KEY_PATH}'
|
sh 'docker login -u _json_key --password-stdin https://gcr.io/overleaf-ops < ${DOCKER_REPO_KEY_PATH}'
|
||||||
@@ -60,9 +63,12 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Publish build number') {
|
stage('Publish to s3') {
|
||||||
steps {
|
steps {
|
||||||
sh 'echo ${BRANCH_NAME}-${BUILD_NUMBER} > build_number.txt'
|
sh 'echo ${BRANCH_NAME}-${BUILD_NUMBER} > build_number.txt'
|
||||||
|
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")
|
||||||
|
}
|
||||||
withAWS(credentials:'S3_CI_BUILDS_AWS_KEYS', region:"${S3_REGION_BUILD_ARTEFACTS}") {
|
withAWS(credentials:'S3_CI_BUILDS_AWS_KEYS', region:"${S3_REGION_BUILD_ARTEFACTS}") {
|
||||||
// The deployment process uses this file to figure out the latest build
|
// The deployment process uses this file to figure out the latest build
|
||||||
s3Upload(file:'build_number.txt', bucket:"${S3_BUCKET_BUILD_ARTEFACTS}", path:"${JOB_NAME}/latest")
|
s3Upload(file:'build_number.txt', bucket:"${S3_BUCKET_BUILD_ARTEFACTS}", path:"${JOB_NAME}/latest")
|
||||||
|
|||||||
10
Makefile
10
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.11
|
# Version: 1.1.20
|
||||||
|
|
||||||
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,7 +13,6 @@ 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:
|
||||||
docker rmi ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
docker rmi ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
||||||
docker rmi gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
docker rmi gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
||||||
@@ -27,7 +26,9 @@ 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 test_acceptance_pre_run # clear the database before each acceptance test run
|
test_acceptance: test_clean test_acceptance_pre_run test_acceptance_run
|
||||||
|
|
||||||
|
test_acceptance_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:
|
||||||
@@ -40,6 +41,9 @@ build:
|
|||||||
--tag gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) \
|
--tag gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) \
|
||||||
.
|
.
|
||||||
|
|
||||||
|
tar:
|
||||||
|
$(DOCKER_COMPOSE) up tar
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
|
|
||||||
docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
--script-version=1.1.11
|
|
||||||
clsi
|
clsi
|
||||||
|
--language=coffeescript
|
||||||
--node-version=10.15.0
|
--node-version=10.15.0
|
||||||
--acceptance-creds=None
|
--acceptance-creds=None
|
||||||
--language=coffeescript
|
|
||||||
--dependencies=mongo,redis
|
--dependencies=mongo,redis
|
||||||
--docker-repos=gcr.io/overleaf-ops
|
--docker-repos=gcr.io/overleaf-ops
|
||||||
--kube=false
|
|
||||||
--build-target=docker
|
--build-target=docker
|
||||||
|
--script-version=1.1.20
|
||||||
|
|||||||
@@ -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.11
|
# Version: 1.1.20
|
||||||
|
|
||||||
version: "2"
|
version: "2"
|
||||||
|
|
||||||
@@ -9,6 +9,8 @@ services:
|
|||||||
test_unit:
|
test_unit:
|
||||||
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
command: npm run test:unit:_run
|
command: npm run test:unit:_run
|
||||||
|
environment:
|
||||||
|
NODE_ENV: test
|
||||||
|
|
||||||
|
|
||||||
test_acceptance:
|
test_acceptance:
|
||||||
@@ -23,11 +25,22 @@ services:
|
|||||||
MONGO_HOST: mongo
|
MONGO_HOST: mongo
|
||||||
POSTGRES_HOST: postgres
|
POSTGRES_HOST: postgres
|
||||||
MOCHA_GREP: ${MOCHA_GREP}
|
MOCHA_GREP: ${MOCHA_GREP}
|
||||||
|
NODE_ENV: test
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongo
|
- mongo
|
||||||
- redis
|
- redis
|
||||||
command: npm run test:acceptance:_run
|
command: npm run test:acceptance:_run
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
tar:
|
||||||
|
build: .
|
||||||
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
|
volumes:
|
||||||
|
- ./:/tmp/build/
|
||||||
|
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
||||||
|
user: root
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
|
|
||||||
|
|||||||
@@ -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.11
|
# Version: 1.1.20
|
||||||
|
|
||||||
version: "2"
|
version: "2"
|
||||||
|
|
||||||
@@ -13,6 +13,7 @@ services:
|
|||||||
working_dir: /app
|
working_dir: /app
|
||||||
environment:
|
environment:
|
||||||
MOCHA_GREP: ${MOCHA_GREP}
|
MOCHA_GREP: ${MOCHA_GREP}
|
||||||
|
NODE_ENV: test
|
||||||
command: npm run test:unit
|
command: npm run test:unit
|
||||||
|
|
||||||
test_acceptance:
|
test_acceptance:
|
||||||
@@ -29,14 +30,27 @@ services:
|
|||||||
MONGO_HOST: mongo
|
MONGO_HOST: mongo
|
||||||
POSTGRES_HOST: postgres
|
POSTGRES_HOST: postgres
|
||||||
MOCHA_GREP: ${MOCHA_GREP}
|
MOCHA_GREP: ${MOCHA_GREP}
|
||||||
|
LOG_LEVEL: ERROR
|
||||||
|
NODE_ENV: test
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongo
|
- mongo
|
||||||
- redis
|
- redis
|
||||||
command: npm run test:acceptance
|
command: npm run test:acceptance
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
tar:
|
||||||
|
build: .
|
||||||
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
||||||
|
volumes:
|
||||||
|
- ./:/tmp/build/
|
||||||
|
command: tar -czf /tmp/build/build.tar.gz --exclude=build.tar.gz --exclude-vcs .
|
||||||
|
user: root
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
image: mongo:3.4
|
image: mongo:3.4
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"compile:app": "([ -e app/coffee ] && coffee -m $COFFEE_OPTIONS -o app/js -c app/coffee || echo 'No CoffeeScript folder to compile') && ( [ -e app.coffee ] && coffee -m $COFFEE_OPTIONS -c app.coffee || echo 'No CoffeeScript app to compile')",
|
"compile:app": "([ -e app/coffee ] && coffee -m $COFFEE_OPTIONS -o app/js -c app/coffee || echo 'No CoffeeScript folder to compile') && ( [ -e app.coffee ] && coffee -m $COFFEE_OPTIONS -c app.coffee || echo 'No CoffeeScript app to compile')",
|
||||||
"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 60000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 30000 --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 --reporter spec --exit $@ 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",
|
"test:unit": "npm run compile:app && npm run compile:unit_tests && npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
||||||
|
|||||||
Reference in New Issue
Block a user