mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-27 09:52:36 +00:00
f6a693c1f5
Fix CE build by using overleaf image GitOrigin-RevId: 302d7a69fa210548fd0845b2d55d80398c0c6001
55 lines
1.7 KiB
YAML
55 lines
1.7 KiB
YAML
---
|
|
|
|
steps:
|
|
- id: build-base
|
|
name: us-east1-docker.pkg.dev/overleaf-ops/ol-docker/cloud-builder
|
|
dir: server-ce
|
|
args:
|
|
- 'build-base'
|
|
- 'OVERLEAF_BASE_CACHE=${_IMAGE_BASE_CACHE}'
|
|
- 'OVERLEAF_BASE_TAG=${_IMAGE_BASE}'
|
|
- id: build-community
|
|
name: us-east1-docker.pkg.dev/overleaf-ops/ol-docker/cloud-builder
|
|
dir: server-ce
|
|
args:
|
|
- build-community
|
|
- 'OVERLEAF_BASE_CACHE=${_IMAGE_BASE_CACHE}'
|
|
- 'OVERLEAF_BASE_TAG=${_IMAGE_BASE}'
|
|
- 'OVERLEAF_TAG=${_IMAGE_TAG}'
|
|
- id: tag_main_latest_base
|
|
name: gcr.io/cloud-builders/docker
|
|
script: |
|
|
#!/usr/bin/env bash
|
|
set -e
|
|
if [ ${BRANCH_NAME} == main ]; then
|
|
docker tag ${_IMAGE_BASE} ${_IMAGE_BASE_CACHE};
|
|
docker push ${_IMAGE_BASE_CACHE};
|
|
fi
|
|
automapSubstitutions: true
|
|
- id: tag_main_latest
|
|
name: gcr.io/cloud-builders/docker
|
|
script: |
|
|
#!/usr/bin/env bash
|
|
set -e
|
|
if [ $BRANCH_NAME == main ]; then
|
|
docker tag ${_IMAGE_TAG} ${_IMAGE_CE};
|
|
docker push ${_IMAGE_CE};
|
|
fi
|
|
automapSubstitutions: true
|
|
timeout: 3600s
|
|
options:
|
|
machineType: E2_HIGHCPU_32
|
|
env:
|
|
- 'BRANCH_NAME=${BRANCH_NAME}'
|
|
images:
|
|
- '${_IMAGE_BASE}'
|
|
- '${_IMAGE_TAG}'
|
|
substitutions:
|
|
_IMAGE_BASE: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf-base:${BRANCH_NAME}-${SHORT_SHA}_${BUILD_ID}'
|
|
_IMAGE_BASE_CACHE: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf-base:latest'
|
|
_IMAGE_CE: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf:latest'
|
|
_IMAGE_TAG: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/overleaf:${BRANCH_NAME}-${SHORT_SHA}_${BUILD_ID}'
|
|
tags:
|
|
- 'overleaf-public'
|
|
- '${BRANCH_NAME}'
|
|
- '${SHORT_SHA}'
|