Hi Aref,

So if I understood this correct:

IN CLOUDBUILD.YAML:
steps:
# Build the Docker image and load it into the Docker daemon.
- name: 'gcr.io/cloud-builders/docker'
  args: ['build', '--tag=gcr.io/$PROJECT_ID/deploy:latest', '.']
  # The loaded image name is the BUILD target's name, prefixed with bazel/.
- name: 'gcr.io/cloud-builders/bazel'
  args: ['run', 'gcr.io/$PROJECT_ID/deploy:latest']
# Re-tag the image to something in your project's gcr.io repository.
- name: 'gcr.io/cloud-builders/docker'
  args: ['tag', 'gcr.io/$PROJECT_ID/deploy:latest', 'gcr.io/$PROJECT_ID/server']
# Push the image.
images: ['gcr.io/$PROJECT_ID/server']


In WORKSPACE:
load(
    "@io_bazel_rules_docker//python:image.bzl",
    _py_image_repos = "repositories",
)

_py_image_repos()


IN BUILD FILES:
  load("@io_bazel_rules_docker//python:image.bzl", "py3_image")

  REPLACE py_binary with py3_image(
  name = "py_image",
  srcs = ["py_image.py"],
  deps = [":py_image_library"],
  main = "py_image.py",
  # "layers" is just like "deps", but it also moves the dependencies each into
  # their own layer, which can dramatically improve developer cycle time.  For
  # example here, the grpcio layer is ~40MB, but the rest of the app is only
  # ~400KB.  By partitioning things this way, the large grpcio layer remains
  # unchanging and we can reduce the amount of image data we repush by ~99%!
  layers = [
    requirement("grpcio"),
    "//examples/hellogrpc/proto:py",
  ],
  )


And then
sudo gcloud builds submit --config package/cloudbuild.yaml ./package/ 

 sudo gcloud app deploy app.yaml Enter code here...

Is this the correct way to use bazel and deploy to gae standard?

Thanks.


On Saturday, May 18, 2019 at 2:43:07 AM UTC+5:30, Aref Amiri (Cloud 
Platform Support) wrote:
>
> When deploying App GAE Standard, it auto creates the Cloud Build 
> <https://cloud.google.com/appengine/docs/standard/python3/testing-and-deploying-your-app#managing_build_images>image
>  
> but cannot be altered or use Bazel. If you intend to use Bazel command in 
> Cloud Build you can follow the instructions here 
> <https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/bazel>. 
>
>
> Based on the information you've provided, this seems to be running in GAE 
> Flex but the title is GAE Standard. Can you confirm which one you are 
> referring to?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/1c47d0e3-01b3-441f-b7ea-79729f033c9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appeng... 'Aref Amiri (Cloud Platform Support)' via Google App Engine
    • [google-a... Akkul Sahariya
      • [goog... 'George (Cloud Platform Support)' via Google App Engine
    • [google-a... Akkul Sahariya
      • [goog... 'Aref Amiri (Cloud Platform Support)' via Google App Engine

Reply via email to