google cloud platform - How do I specify a source in build requests using gcloud container builds submit? -


i trying specify build request source specified reposource:

{                                                                                                                                                                                                              "source": {                                                                                                                                                                                                    "reposource": {                                                                                                                                                                                                "reponame": "myrepo",                                                                                                                                                                                        "branchname": "master"                                                                                                                                                                                 }                                                                                                                                                                                                      },                                                                                                                                                                                                         "steps": [                                                                                                                                                                                                     {                                                                                                                                                                                                              "name": "gcr.io/cloud-builders/docker",                                                                                                                                                                    "args": ["build", "-t", "gcr.io/$project_id/zookeeper", "."]                                                                                                                                           }                                                                                                                                                                                                      ],                                                                                                                                                                                                         "images": [                                                                                                                                                                                                    "gcr.io/$project_id/zookeeper"                                                                                                                                                                         ]                                                                                                                                                                                                      } 

however, when attempt submit gcloud, error:

$ gcloud container builds submit --no-source --config cloudbuild.json error: (gcloud.container.builds.submit) cloudbuild.json: config cannot specify source  

in "writing custom build requests" says:

when submit build requests using gcloud command-line tool, source field may not necessary if specify source command-line argument. may specify source in build request file. see gcloud documentation more information.

note: storagesource , reposource fields described in build resource documentation differ source field. storagesource instructs container builder find source files in cloud storage bucket, , reposource refers cloud source repository containing source files.

so how, then, specify reposource gcloud? seeing gs:// url prefix documented.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -