Przeglądaj źródła

bulk update build scripts

- logger, metrics build scripts updates
Henry Oswald 7 lat temu
rodzic
commit
6f06598eb5

+ 8 - 2
services/chat/Jenkinsfile

@@ -48,8 +48,11 @@ pipeline {
       }
     }
 
-    stage('Package and publish build') {
+    stage('Package and docker push') {
       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')]) {
           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 {
         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}") {
             // 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")

+ 4 - 2
services/chat/Makefile

@@ -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.11
+# Version: 1.1.12
 
 BUILD_NUMBER ?= local
 BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
@@ -13,7 +13,6 @@ DOCKER_COMPOSE := BUILD_NUMBER=$(BUILD_NUMBER) \
 	MOCHA_GREP=${MOCHA_GREP} \
 	docker-compose ${DOCKER_COMPOSE_FLAGS}
 
-
 clean:
 	docker rmi ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
 	docker rmi gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
@@ -38,6 +37,9 @@ build:
 		--tag gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) \
 		.
 
+tar:
+	$(DOCKER_COMPOSE) up tar
+
 publish:
 
 	docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)

+ 2 - 3
services/chat/buildscript.txt

@@ -1,9 +1,8 @@
---script-version=1.1.11
 chat
+--language=es
 --node-version=6.14.1
 --acceptance-creds=None
---language=es
 --dependencies=mongo,redis
 --docker-repos=gcr.io/overleaf-ops
---kube=false
 --build-target=docker
+--script-version=1.1.12

+ 11 - 1
services/chat/docker-compose.ci.yml

@@ -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.11
+# Version: 1.1.12
 
 version: "2"
 
@@ -27,6 +27,16 @@ services:
     user: node
     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:
     image: redis
 

+ 11 - 1
services/chat/docker-compose.yml

@@ -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.11
+# Version: 1.1.12
 
 version: "2"
 
@@ -33,6 +33,16 @@ services:
       - redis
     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:
     image: redis
 

Plik diff jest za duży
+ 644 - 205
services/chat/npm-shrinkwrap.json


+ 3 - 3
services/chat/package.json

@@ -18,12 +18,12 @@
   "dependencies": {
     "async": "0.2.9",
     "express": "3.3.1",
-    "logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.5.9",
-    "metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v2.0.12",
+    "logger-sharelatex": "^1.6.0",
+    "metrics-sharelatex": "^2.1.1",
     "mongojs": "2.4.0",
     "redis": "~0.10.1",
     "request": "^2.79.0",
-    "settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.1.0",
+    "settings-sharelatex": "^1.1.0",
     "v8-profiler": "^5.6.5"
   },
   "devDependencies": {

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików