Update build scripts from 1.1.3 to 1.1.6

This commit is contained in:
Christopher Hoskin 2018-06-12 10:22:30 +01:00
parent 15aae19d2d
commit 824745dfbc
5 changed files with 26 additions and 11 deletions

View file

@ -29,7 +29,13 @@ pipeline {
stage('Package and publish build') { stage('Package and publish build') {
steps { steps {
sh 'make publish'
withCredentials([file(credentialsId: 'csh-gcdm-test', variable: 'DOCKER_REPO_KEY_PATH')]) {
sh 'docker login -u _json_key --password-stdin https://csh-gcdm-test < ${DOCKER_REPO_KEY_PATH}'
}
sh 'DOCKER_REPO=csh-gcdm-test make publish'
sh 'docker logout https://csh-gcdm-test'
} }
} }
@ -47,6 +53,7 @@ pipeline {
post { post {
always { always {
sh 'DOCKER_COMPOSE_FLAGS="-f docker-compose.ci.yml" make test_clean' sh 'DOCKER_COMPOSE_FLAGS="-f docker-compose.ci.yml" make test_clean'
sh 'make clean'
} }
failure { failure {

View file

@ -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.3 # Version: 1.1.6
BUILD_NUMBER ?= local BUILD_NUMBER ?= local
BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD) BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
@ -15,6 +15,8 @@ DOCKER_COMPOSE := BUILD_NUMBER=$(BUILD_NUMBER) \
clean: clean:
docker rmi ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
docker rmi csh-gcdm-test/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
rm -f app.js rm -f app.js
rm -rf app/js rm -rf app/js
rm -rf test/unit/js rm -rf test/unit/js
@ -34,9 +36,12 @@ test_clean:
test_acceptance_pre_run: 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 @[ ! -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 gcr.io/csh-gcdm-test/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) . docker build --pull --tag ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) \
--tag csh-gcdm-test/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) \
.
publish: publish:
docker push gcr.io/csh-gcdm-test/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
docker push $(DOCKER_REPO)/$(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

View file

@ -1,25 +1,27 @@
# 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.3 # Version: 1.1.6
version: "2" version: "2"
services: services:
test_unit: test_unit:
image: gcr.io/csh-gcdm-test/$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
test_acceptance: test_acceptance:
build: . build: .
image: gcr.io/csh-gcdm-test/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
extends: extends:
file: docker-compose-config.yml file: docker-compose-config.yml
service: ci service: ci
environment: environment:
ELASTIC_SEARCH_DSN: es:9200
REDIS_HOST: redis REDIS_HOST: redis
MONGO_HOST: mongo MONGO_HOST: mongo
POSTGRES_HOST: postgres POSTGRES_HOST: postgres
MOCHA_GREP: ${MOCHA_GREP}
depends_on: depends_on:
- mongo - mongo
- redis - redis
@ -30,4 +32,3 @@ services:
mongo: mongo:
image: mongo:3.4 image: mongo:3.4

View file

@ -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.3 # Version: 1.1.6
version: "2" version: "2"
@ -24,6 +24,7 @@ services:
file: docker-compose-config.yml file: docker-compose-config.yml
service: dev service: dev
environment: environment:
ELASTIC_SEARCH_DSN: es:9200
REDIS_HOST: redis REDIS_HOST: redis
MONGO_HOST: mongo MONGO_HOST: mongo
POSTGRES_HOST: postgres POSTGRES_HOST: postgres
@ -32,6 +33,7 @@ services:
- mongo - mongo
- redis - redis
command: npm run test:acceptance command: npm run test:acceptance
redis: redis:
image: redis image: redis

View file

@ -10,9 +10,9 @@
"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: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 30000 --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 --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",
"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",