title: How do I specify a source in build requests using gcloud container builds submit?
body: <p>I am trying to specify a build request with the <code>source</code> specified as a <code>repoSource</code>:</p>
  <pre><code>{                                                                                                                                                                                                         
      &quot;source&quot;: {                                                                                                                                                                                           
          &quot;repoSource&quot;: {                                                                                                                                                                                   
              &quot;repoName&quot;: &quot;myRepo&quot;,                                                                                                                                                                           
              &quot;branchName&quot;: &quot;master&quot;                                                                                                                                                                        
          }                                                                                                                                                                                                 
      },                                                                                                                                                                                                    
      &quot;steps&quot;: [                                                                                                                                                                                            
          {                                                                                                                                                                                                 
              &quot;name&quot;: &quot;gcr.io/cloud-builders/docker&quot;,                                                                                                                                                       
              &quot;args&quot;: [&quot;build&quot;, &quot;-t&quot;, &quot;gcr.io/$PROJECT_ID/zookeeper&quot;, &quot;.&quot;]                                                                                                                                  
          }                                                                                                                                                                                                 
      ],                                                                                                                                                                                                    
      &quot;images&quot;: [                                                                                                                                                                                           
          &quot;gcr.io/$PROJECT_ID/zookeeper&quot;                                                                                                                                                                    
      ]                                                                                                                                                                                                     
  }
  </code></pre>
  <p>However, when I attempt to submit it with gcloud, I get an error:</p>
  <pre><code>$ gcloud container builds submit --no-source --config cloudbuild.json
  ERROR: (gcloud.container.builds.submit) cloudbuild.json: config cannot specify source 
  </code></pre>
  <p>In <a href="https://cloud.google.com/container-builder/docs/how-to/writing-build-requests" rel="nofollow noreferrer">&quot;Writing Custom Build Requests&quot;</a> it says:</p>
  <blockquote>
  <p>When you submit build requests using the gcloud command-line tool, the source field may not be necessary if you specify the source as a command-line argument. You may also specify a source in your build request file. See the gcloud documentation for more information.</p>
  <p>Note: The storageSource and repoSource fields described in the Build resource documentation differ from the source field. storageSource instructs Container Builder to find the source files in a Cloud Storage bucket, and repoSource refers to a Cloud Source Repository containing the source files.</p>
  </blockquote>
  <p>So how, then, do you specify repoSource with gcloud? I am only seeing the gs:// url prefix documented.</p>