| # Copyright 2020 The Go Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style | |
| # license that can be found in the LICENSE file. | |
| timeout: 5400s | |
| options: | |
| machineType: N1_HIGHCPU_8 | |
| env: | |
| # To prevent errors from tput when TERM is unset. | |
| - TERM=dumb | |
| steps: | |
| - id: all.bash | |
| name: gcr.io/cloud-builders/docker | |
| entrypoint: devtools/docker/compose.sh | |
| args: | |
| - run | |
| - allbash | |
| - ci | |
| env: | |
| # Pass the Cloud Build Go version parameter down to Docker Compose to ensure consistency. | |
| - GO_VERSION=$_GO_VERSION | |
| - id: Prepare | |
| name: gcr.io/cloud-builders/gcloud | |
| entrypoint: deploy/prepare.sh | |
| args: | |
| - $PROJECT_ID | |
| - id: Tidy private | |
| name: golang:$_GO_VERSION | |
| entrypoint: sh | |
| args: | |
| - -c | |
| - cd private && go mod tidy | |
| - id: Check redistributable | |
| name: golang:$_GO_VERSION | |
| entrypoint: private/devtools/check_redist.sh | |
| - id: Build | |
| name: gcr.io/cloud-builders/docker | |
| entrypoint: sh | |
| args: | |
| - -c | |
| - deploy/build.sh $PROJECT_ID $(cat _BUILD_TAG) $_GO_VERSION | |
| - id: Config - staging | |
| name: gcr.io/cloud-builders/gcloud | |
| entrypoint: deploy/config.sh | |
| args: | |
| - staging | |
| - id: Worker - staging | |
| # TODO(go.dev/issue/75234): gke-deploy no longer includes docker. Pin to | |
| # the last known working version. | |
| name: gcr.io/cloud-builders/gke-deploy:deprecated-public-image-b3fbf767097aefbe6f4ca2dd360338bddbf6f4f60d925c1b31886560579bcd2e | |
| entrypoint: sh | |
| args: | |
| - -c | |
| - deploy/worker.sh staging gcr.io/$PROJECT_ID/worker:$(cat _BUILD_TAG) | |
| - id: Frontend - staging | |
| name: gcr.io/cloud-builders/gcloud | |
| entrypoint: sh | |
| args: | |
| - -c | |
| - deploy/frontend.sh staging gcr.io/$PROJECT_ID/frontend:$(cat _BUILD_TAG) | |
| - id: Pagecheck - staging | |
| name: golang:$_GO_VERSION | |
| entrypoint: deploy/pagecheck.sh | |
| args: | |
| - staging | |
| - id: screentest - staging | |
| name: gcr.io/cloud-builders/docker | |
| entrypoint: deploy/screentest.sh | |
| args: | |
| - staging | |
| env: | |
| - QUOTA_BYPASS=$_QUOTA_BYPASS | |
| - GO_VERSION=$_GO_VERSION | |
| - id: Config - prod | |
| name: gcr.io/cloud-builders/gcloud | |
| entrypoint: deploy/config.sh | |
| args: | |
| - prod | |
| - id: Worker - prod | |
| # TODO(go.dev/issue/75234): gke-deploy no longer includes docker. Pin to | |
| # the last known working version. | |
| name: gcr.io/cloud-builders/gke-deploy:deprecated-public-image-b3fbf767097aefbe6f4ca2dd360338bddbf6f4f60d925c1b31886560579bcd2e | |
| entrypoint: sh | |
| args: | |
| - -c | |
| - deploy/worker.sh prod gcr.io/$PROJECT_ID/worker:$(cat _BUILD_TAG) | |
| - id: Frontend - prod | |
| name: gcr.io/cloud-builders/gcloud | |
| entrypoint: sh | |
| args: | |
| - -c | |
| - deploy/frontend.sh prod gcr.io/$PROJECT_ID/frontend:$(cat _BUILD_TAG) | |
| - id: Pagecheck - prod | |
| name: golang:$_GO_VERSION | |
| entrypoint: deploy/pagecheck.sh | |
| args: | |
| - prod | |
| artifacts: | |
| objects: | |
| location: 'gs://$PROJECT_ID/screentest-artifacts' | |
| paths: | |
| - 'tests/screentest/output/*' | |
| - 'tests/screentest/output/testcases/*' | |
| substitutions: | |
| _GO_VERSION: 1.27rc1 | |