Merge pull request #16823 from overleaf/csh-issue-15655-sp3

Update CE/SP builds

GitOrigin-RevId: b5a0c4842d17a7a869b6e2f4c364bafb825a4fe5
This commit is contained in:
Christopher Hoskin 2024-01-30 17:23:46 +00:00 committed by Copybot
parent 26ee64fe62
commit 660c5abb3d

View file

@ -2,42 +2,40 @@
steps: steps:
- id: build-base - id: build-base
name: gcr.io/overleaf-ops/cloud-builder name: us-east1-docker.pkg.dev/overleaf-ops/ol-docker/cloud-builder
dir: server-ce dir: server-ce
args: args:
- 'build-base' - 'build-base'
- 'SHARELATEX_BASE_CACHE=${_IMAGE_BASE_CACHE}' - 'OVERLEAF_BASE_CACHE=${_IMAGE_BASE_CACHE}'
- 'SHARELATEX_BASE_TAG=${_IMAGE_BASE}' - 'OVERLEAF_BASE_TAG=${_IMAGE_BASE}'
- id: build-community - id: build-community
name: gcr.io/overleaf-ops/cloud-builder name: us-east1-docker.pkg.dev/overleaf-ops/ol-docker/cloud-builder
dir: server-ce dir: server-ce
args: args:
- build-community - build-community
- 'SHARELATEX_BASE_CACHE=${_IMAGE_BASE_CACHE}' - 'OVERLEAF_BASE_CACHE=${_IMAGE_BASE_CACHE}'
- 'SHARELATEX_BASE_TAG=${_IMAGE_BASE}' - 'OVERLEAF_BASE_TAG=${_IMAGE_BASE}'
- 'SHARELATEX_TAG=${_IMAGE_TAG}' - 'OVERLEAF_TAG=${_IMAGE_TAG}'
- id: tag_master_latest_base - id: tag_main_latest_base
name: gcr.io/cloud-builders/docker name: gcr.io/cloud-builders/docker
args: script: |
- '-e' #!/usr/bin/env bash
- '-c' set -e
- >- if [ ${BRANCH_NAME} == main ]; then
if [ ${BRANCH_NAME} == main ]; then docker tag ${_IMAGE_BASE} ${_IMAGE_BASE_CACHE};
docker tag ${_IMAGE_BASE} ${_IMAGE_BASE_CACHE}; docker push ${_IMAGE_BASE_CACHE};
docker push ${_IMAGE_BASE_CACHE}; fi
fi automapSubstitutions: true
entrypoint: /bin/bash - id: tag_main_latest
- id: tag_master_latest
name: gcr.io/cloud-builders/docker name: gcr.io/cloud-builders/docker
args: script: |
- '-e' #!/usr/bin/env bash
- '-c' set -e
- >- if [ $BRANCH_NAME == main ]; then
if [ $BRANCH_NAME == main ]; then docker tag ${_IMAGE_TAG} ${_IMAGE_CE};
docker tag ${_IMAGE_TAG} ${_IMAGE_CE}; docker push ${_IMAGE_CE};
docker push ${_IMAGE_CE}; fi
fi automapSubstitutions: true
entrypoint: /bin/bash
timeout: 3600s timeout: 3600s
options: options:
machineType: E2_HIGHCPU_32 machineType: E2_HIGHCPU_32
@ -47,10 +45,10 @@ images:
- '${_IMAGE_BASE}' - '${_IMAGE_BASE}'
- '${_IMAGE_TAG}' - '${_IMAGE_TAG}'
substitutions: substitutions:
_IMAGE_BASE: 'gcr.io/overleaf-ops/sharelatex-base:${BRANCH_NAME}-${SHORT_SHA}_${BUILD_ID}' _IMAGE_BASE: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/sharelatex-base:${BRANCH_NAME}-${SHORT_SHA}_${BUILD_ID}'
_IMAGE_BASE_CACHE: 'gcr.io/overleaf-ops/sharelatex-base:latest' _IMAGE_BASE_CACHE: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/sharelatex-base:latest'
_IMAGE_CE: 'gcr.io/overleaf-ops/sharelatex:latest' _IMAGE_CE: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/sharelatex:latest'
_IMAGE_TAG: 'gcr.io/overleaf-ops/sharelatex:${BRANCH_NAME}-${SHORT_SHA}_${BUILD_ID}' _IMAGE_TAG: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/sharelatex:${BRANCH_NAME}-${SHORT_SHA}_${BUILD_ID}'
tags: tags:
- 'overleaf-public' - 'overleaf-public'
- '${BRANCH_NAME}' - '${BRANCH_NAME}'