File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,24 +6,21 @@ source .github/scripts/cloud_run_env.sh
66cloud_run_set_defaults
77
88if [[ " ${CLOUD_RUN_DRY_RUN:- 0} " == " 1" ]]; then
9- cloud_run_run gcloud services enable run.googleapis.com artifactregistry.googleapis.com cloudbuild.googleapis.com --project " ${CLOUD_RUN_PROJECT} "
109 cloud_run_run gcloud artifacts repositories describe " ${CLOUD_RUN_ARTIFACT_REPOSITORY} " --project " ${CLOUD_RUN_PROJECT} " --location " ${CLOUD_RUN_REGION} "
11- cloud_run_run gcloud artifacts repositories create " ${CLOUD_RUN_ARTIFACT_REPOSITORY} " --repository-format docker --location " ${CLOUD_RUN_REGION} " --description " Docker repository for PolicyEngine API Cloud Run"
1210 cloud_run_run gcloud auth configure-docker " ${CLOUD_RUN_REGION} -docker.pkg.dev" --quiet
1311 cloud_run_run docker build -f gcp/cloud_run/Dockerfile -t " ${CLOUD_RUN_IMAGE_URI} " .
1412 cloud_run_run docker push " ${CLOUD_RUN_IMAGE_URI} "
1513 exit 0
1614fi
1715
18- gcloud services enable run.googleapis.com artifactregistry.googleapis.com cloudbuild.googleapis.com --project " ${CLOUD_RUN_PROJECT} "
19-
2016if ! gcloud artifacts repositories describe " ${CLOUD_RUN_ARTIFACT_REPOSITORY} " \
2117 --project " ${CLOUD_RUN_PROJECT} " \
2218 --location " ${CLOUD_RUN_REGION} " > /dev/null 2>&1 ; then
23- gcloud artifacts repositories create " ${CLOUD_RUN_ARTIFACT_REPOSITORY} " \
24- --repository-format docker \
25- --location " ${CLOUD_RUN_REGION} " \
26- --description " Docker repository for PolicyEngine API Cloud Run"
19+ cat >&2 << EOF
20+ Missing Artifact Registry repository '${CLOUD_RUN_ARTIFACT_REPOSITORY} ' in ${CLOUD_RUN_PROJECT} /${CLOUD_RUN_REGION} .
21+ Provision the repository once before running Cloud Run deploys.
22+ EOF
23+ exit 1
2724fi
2825
2926gcloud auth configure-docker " ${CLOUD_RUN_REGION} -docker.pkg.dev" --quiet
Original file line number Diff line number Diff line change 1+ Removed one-time Cloud Run API enablement and Artifact Registry repository creation from the deploy image build script.
You can’t perform that action at this time.
0 commit comments