CI/CD Issue with ESP

102 views
Skip to first unread message

Ankit Dwivedi

unread,
Jun 21, 2022, 2:59:18 AM6/21/22
to Google Cloud Endpoints
Hi All,

We have deployed our application on app engine using "Endpoints on app engine using ESPv2" and we are trying to create a CI/CD process using cloud build where are are able to automate deployment over app engine but we are not able to find out, how to can run the esp deployment commands like - 

./gcloud_build_image -s sandbox- XXXXXXXXXXXXXXXXXx
or 
gcloud run deploy sandbox-o **********************

Can you please help us to know, is this possible to automate the ci/cd process completely using any of the way either Cloud build, github or whatever can be. 

Regards,
Ankit

Teju Nareddy

unread,
Jun 21, 2022, 6:09:07 PM6/21/22
to Google Cloud Endpoints
Hi Ankit,

The ESPv2 repo currently has automated e2e tests for our dev continuous integration. The automated e2e tests follow the same deployment logic as the public deployment guides.
They are implemented with bash scripts. For your case, you can follow the script here: https://github.com/GoogleCloudPlatform/esp-v2/blob/master/prow/e2e-cloud-run-app-engine-http-bookstore.sh
The successful test runs and logs from our CI are here: https://testgrid.k8s.io/googleoss-esp-v2-periodic#e2e-app-engine-http-bookstore

crist...@google.com

unread,
Jun 21, 2022, 6:22:41 PM6/21/22
to Google Cloud Endpoints

On this GitHub repo, there is a step by step guide to deploy GCP endpoints using Cloud Run. This example follows the following quickstart: Set up Cloud Endpoints OpenAPI for Cloud Run with ESPv2.

Also, there are some other tutorials related to this topic, as follows:

Another useful quickstart is: Automate App Engine deployments with Cloud Build. There is also a community tutorial titled Creating a CI/CD environment for serverless containers on Cloud Run with GitHub Actions which would be helpful.

On Tuesday, June 21, 2022 at 1:59:18 AM UTC-5 ankit...@gmail.com wrote:

Ankit Dwivedi

unread,
Jun 22, 2022, 6:46:30 AM6/22/22
to Google Cloud Endpoints
Hi Cristianrm,

Thanks for your reply.

As we are clear now that using cloud build we can deploy application on App engine but as we have below steps to deploy application completely -

1. gcloud app deploy
2. gcloud run deploy SERVICENAME --image="gcr.io/cloudrun/hello" --allow-unauthenticated --platform managed --project=PROJECTNAME
3. gcloud endpoints services deploy swagger.yaml --project PROJECTNAME
4. ./gcloud_build_image -s s***************8q-wl.a.run.app -c 2022-06-16r0 -p PROJECTNAME
5. gcloud run deploy SERVICENAME \
  --image="GCR IMAGE" \
  --allow-unauthenticated \
  --platform managed \
  --project PROJECTNAME

So from the above given steps we are able to perform first step using cloudbuild.yaml file by giving step like
steps:
- name: "gcr.io/cloud-builders/gcloud"
  args: ["app", "deploy"]
timeout: "1600s"


Is there any way to run another steps(2, 3, 4, 5 given above) also using the same cloudbuild.yaml file or is there any way to do this using github.

Please help us to understand this.

Regards,
Ankit 

crist...@google.com

unread,
Jun 22, 2022, 5:19:53 PM6/22/22
to Google Cloud Endpoints

This reference page explains the schema of the Cloud Build configuration file. For instructions on creating and using a build config file, see Creating a basic build config file.

There is also this tutorial for Continuous integration using Google Cloud Build and Create CI/CD pipeline with GitLab and Cloud Build

Reply all
Reply to author
Forward
0 new messages