The scripts in this directory are meant to be run as steps in Cloud Build.
See the Cloud Build triggers page for a list of available triggers.
deploy-env.yaml deploys the config, worker, and frontend for a single environment. The environment is configurable from the Cloud Build trigger execution page.
deploy.yaml deploys to staging, runs e2e tests, and if the tests pass, deploys to production.
The Go runtime version used for deployments and docker environments is managed independently from the go.mod language version constraint.
The Go image version is parameterized in all Cloud Build files (deploy/*.yaml) using a _GO_VERSION substitution:
substitutions: _GO_VERSION: 1.27rc1
This version is used by all Go build steps via golang:$_GO_VERSION. To update the version for GCP Cloud Build deployments, update _GO_VERSION in the substitutions: block of:
deploy/deploy.yamldeploy/deploy-env.yamldeploy/migrate.yamldeploy/sitemap.yamlWhen building service container images (frontend and worker), deploy/deploy-env.yaml and deploy/deploy.yaml pass $_GO_VERSION as an argument to deploy/build.sh:
- deploy/build.sh $PROJECT_ID $(cat _BUILD_TAG) $_GO_VERSION
deploy/build.sh forwards this version to docker build via --build-arg GO_VERSION=$_GO_VERSION, setting the base image tag in the private repository's Dockerfiles (config/Dockerfile.frontend and config/Dockerfile.worker).
For local development and testing under docker, the Go version is defined in devtools/docker.sh:
export GO_VERSION=${GO_VERSION:-$(get_go_version || echo 1.26.4)}
Docker Compose configuration (devtools/docker/compose.yaml) references the ${GO_VERSION} environment variable.
During Cloud Build execution, the all.bash and screentest steps explicitly pass GO_VERSION=$_GO_VERSION to the container environment to ensure testing matches the Cloud Build deployment environment:
env: - GO_VERSION=$_GO_VERSION