does appengine cloudbuild.yaml requires a custom r

2019-07-23 11:07发布

Build errors out with below output (Using a Rails app)

ERROR: (gcloud.app.deploy) There is a cloudbuild.yaml in the current directory, and the runtime field in /workspace/app.yaml is currently set to [runtime: ruby]. To use your cloudbuild.yaml to build a custom runtime, set the runtime field to [runtime: custom]. To continue using the [ruby] runtime, please remove the cloudbuild.yaml from this directory.

1条回答
混吃等死
2楼-- · 2019-07-23 11:36

Cloudbuild.yaml should work with App Engine Flexible without the need to use a custom runtime. As detailed in the error message, you cannot have the app.yaml and the cloudbuild.yaml in the same directory if you are deploying in a non-custom runtime, to remedy the situation, follow these steps:

  1. Move the app.yaml and other ruby files into a subdirectory (use your original app.yaml, no need to use custom runtime)

  2. Under your cloudbuild.yaml steps, modify the argument for app deploy by adding a third one specifying the app.yaml path.

Below is an example:

==================FROM:

steps: 
- name: 'gcr.io/cloud-builders/gcloud' 
args: ['app', 'deploy'] 
timeout: '1600s' 

===================TO:

steps: 
- name: 'gcr.io/cloud-builders/gcloud' 
args: ['app', 'deploy', '[SUBDIRECTORY/app.yaml]'] 
timeout: '1600s' 
查看更多
登录 后发表回答