Skip to main content

2025-07-08

gcloud run deploy CLOUD_RUN_SERVICE_NAME --image="us-central1-docker.pkg.dev/talent-marketplace-dev-558f/talent-marketplace/backend:d59cc53da67b" --allow-unauthenticated --platform managed --project=talent-marketplace-dev-558f


gcloud run deploy espv2-service-talent-marketplace-dev-uc --image="us-central1-docker.pkg.dev/talent-marketplace-dev-558f/talent-marketplace/backend:d59cc53da67b" --allow-unauthenticated --platform managed --project=talent-marketplace-dev-558f

gcloud run deploy espv2-service-talent-marketplace-dev-uc --image="gcr.io/cloudrun/hello" --allow-unauthenticated --platform managed --project=talent-marketplace-dev-558f




To make this the default region, run `gcloud config set run/region us-central1`.

Deploying container to Cloud Run service [espv2-service-talent-marketplace-dev-uc] in project [talent-marketplace-dev-558f] region [us-central1]
Deploying... Done.
Creating Revision...
Routing traffic...
Setting IAM Policy...
Done.
Service [espv2-service-talent-marketplace-dev-uc] revision [espv2-service-talent-marketplace-dev-uc-00002-h4w] has been deployed and is serving 100 percent of traffic.
Service URL: https://espv2-service-talent-marketplace-dev-uc-1047666599239.us-central1.run.app
swagger: '2.0'
info:
title: Cloud Endpoints + Cloud Run
description: Sample API on Cloud Endpoints with a Cloud Run backend
version: 1.0.0
host: espv2-service-talent-marketplace-dev-uc.endpoints.talent-marketplace-dev-558f.cloud.goog
schemes:
- https
produces:
- application/json
x-google-backend:
address: https://talent-marketplace-backend-dev-973f0ea-1047666599239.us-central1.run.app
protocol: h2
paths:
/hello:
get:
summary: Greet a user
operationId: hello
responses:
'200':
description: A successful response
schema:
type: string

gcloud endpoints services deploy /Users/jiexu/coding/tw/talent/talent-marketplace-backend/scripts/openapi-run.yaml --project=talent-marketplace-dev-558f

gcloud endpoints services deploy /Users/jiexu/coding/tw/talent/talent-marketplace-backend/scripts/openapi-run.yaml --project=talent-marketplace-dev-558f
Waiting for async operation operations/services.espv2-service-talent-marketplace-dev-uc.endpoints.talent-marketplace-dev-558f.cloud.goog-0 to complete...
Waiting for async operation operations/serviceConfigs.espv2-service-talent-marketplace-dev-uc.endpoints.talent-marketplace-dev-558f.cloud.goog:902716f1-5c5d-45ab-8d3d-46b76fbffe7d to complete...
Operation finished successfully. The following command can describe the Operation details:
gcloud endpoints operations describe operations/serviceConfigs.espv2-service-talent-marketplace-dev-uc.endpoints.talent-marketplace-dev-558f.cloud.goog:902716f1-5c5d-45ab-8d3d-46b76fbffe7d

Waiting for async operation operations/rollouts.espv2-service-talent-marketplace-dev-uc.endpoints.talent-marketplace-dev-558f.cloud.goog:6bb5029a-210f-4af1-a503-723095211b7f to complete...
Operation finished successfully. The following command can describe the Operation details:
gcloud endpoints operations describe operations/rollouts.espv2-service-talent-marketplace-dev-uc.endpoints.talent-marketplace-dev-558f.cloud.goog:6bb5029a-210f-4af1-a503-723095211b7f

Enabling service [espv2-service-talent-marketplace-dev-uc.endpoints.talent-marketplace-dev-558f.cloud.goog] on project [talent-marketplace-dev-558f]...
Operation "operations/acat.p2-1047666599239-b20087ea-4250-42f5-ab18-b898cd877dfc" finished successfully.


Service Configuration [2025-07-08r0] uploaded for service [espv2-service-talent-marketplace-dev-uc.endpoints.talent-marketplace-dev-558f.cloud.goog]

To manage your API, go to: https://console.cloud.google.com/endpoints/api/espv2-service-talent-marketplace-dev-uc.endpoints.talent-marketplace-dev-558f.cloud.goog/overview?project=talent-marketplace-dev-558f
(base) jiexu:~/ $

gcloud services enable servicemanagement.googleapis.com
gcloud services enable servicecontrol.googleapis.com
https://github.com/GoogleCloudPlatform/esp-v2/tree/master/docker/serverless/gcloud_build_image


chmod +x gcloud_build_image
/Users/jiexu/coding/tw/talent/talent-marketplace-backend/scripts/gcloud_build_image.sh -s espv2-service-talent-marketplace-dev-uc.endpoints.talent-marketplace-dev-558f.cloud.goog -c 2025-07-08r3 -p talent-marketplace-dev-558f
curl --fail -o service.json -H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://servicemanagement.googleapis.com/v1/services/espv2-service-talent-marketplace-dev-uc.endpoints.talent-marketplace-dev-558f.cloud.goog/configs/2025-07-08r0?view=FULL"
const buildEspv2Image = new local.Command("buildEspv2Image", {
create: pulumi.all([endpointsService.configId]).apply(configId => `
bash gcloud_build_image.sh -s my-service.endpoints.my-project.cloud.goog -c ${configId} -p my-project
`),
});

(base) jiexu:~/ $ gcloud projects get-iam-policy talent-marketplace-dev-558f \                                                                 [19:08:05]
--filter="bindings.members:jie.xu@thoughtworks.com" \
--flatten="bindings[].members" \
--format="table(bindings.role)"
ROLE
roles/owner
roles/servicemanagement.admin
roles/servicemanagement.serviceController

gcloud projects get-iam-policy talent-marketplace-dev-558f \                                                                 [19:08:05]
--filter="bindings.members:jie.xu@thoughtworks.com" \
--flatten="bindings[].members" \
--format="table(bindings.role)"
ROLE
roles/owner
roles/servicemanagement.admin
roles/servicemanagement.serviceController
(base) jiexu:~/ $ gcloud projects describe talent-marketplace-dev-558f --format="value(projectNumber)" [19:08:29]
1047666599239


gcloud run services add-iam-policy-binding talent-marketplace-backend-dev \
--member=serviceAccount:service-1047666599239@gcp-sa-endpoints.iam.gserviceaccount.com \
--role=roles/run.invoker \
--project=talent-marketplace-dev-558f \
--region=us-central1


gcloud run services add-iam-policy-binding talent-marketplace-backend-dev-973f0e \
--member=serviceAccount:service-1047666599239@gcp-sa-endpoints.iam.gserviceaccount.com \
--role=roles/run.invoker \
--project=talent-marketplace-dev-558f \
--region=us-central1


Loading Comments...