From 660c5abb3d1db48f55b1412e8ae67bc14af20aa8 Mon Sep 17 00:00:00 2001 From: Christopher Hoskin Date: Tue, 30 Jan 2024 17:23:46 +0000 Subject: [PATCH] Merge pull request #16823 from overleaf/csh-issue-15655-sp3 Update CE/SP builds GitOrigin-RevId: b5a0c4842d17a7a869b6e2f4c364bafb825a4fe5 --- server-ce/cloudbuild.public.yaml | 60 +++++++++++++++----------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/server-ce/cloudbuild.public.yaml b/server-ce/cloudbuild.public.yaml index edc2dbed6a..da8c03a845 100644 --- a/server-ce/cloudbuild.public.yaml +++ b/server-ce/cloudbuild.public.yaml @@ -2,42 +2,40 @@ steps: - 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 args: - 'build-base' - - 'SHARELATEX_BASE_CACHE=${_IMAGE_BASE_CACHE}' - - 'SHARELATEX_BASE_TAG=${_IMAGE_BASE}' + - 'OVERLEAF_BASE_CACHE=${_IMAGE_BASE_CACHE}' + - 'OVERLEAF_BASE_TAG=${_IMAGE_BASE}' - 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 args: - build-community - - 'SHARELATEX_BASE_CACHE=${_IMAGE_BASE_CACHE}' - - 'SHARELATEX_BASE_TAG=${_IMAGE_BASE}' - - 'SHARELATEX_TAG=${_IMAGE_TAG}' - - id: tag_master_latest_base + - '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 - args: - - '-e' - - '-c' - - >- - if [ ${BRANCH_NAME} == main ]; then - docker tag ${_IMAGE_BASE} ${_IMAGE_BASE_CACHE}; - docker push ${_IMAGE_BASE_CACHE}; - fi - entrypoint: /bin/bash - - id: tag_master_latest + 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 - args: - - '-e' - - '-c' - - >- - if [ $BRANCH_NAME == main ]; then - docker tag ${_IMAGE_TAG} ${_IMAGE_CE}; - docker push ${_IMAGE_CE}; - fi - entrypoint: /bin/bash + 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 @@ -47,10 +45,10 @@ images: - '${_IMAGE_BASE}' - '${_IMAGE_TAG}' substitutions: - _IMAGE_BASE: 'gcr.io/overleaf-ops/sharelatex-base:${BRANCH_NAME}-${SHORT_SHA}_${BUILD_ID}' - _IMAGE_BASE_CACHE: 'gcr.io/overleaf-ops/sharelatex-base:latest' - _IMAGE_CE: 'gcr.io/overleaf-ops/sharelatex:latest' - _IMAGE_TAG: 'gcr.io/overleaf-ops/sharelatex:${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: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/sharelatex-base:latest' + _IMAGE_CE: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/sharelatex:latest' + _IMAGE_TAG: 'us-east1-docker.pkg.dev/overleaf-ops/ol-docker/sharelatex:${BRANCH_NAME}-${SHORT_SHA}_${BUILD_ID}' tags: - 'overleaf-public' - '${BRANCH_NAME}'