简体   繁体   中英

Missing unknown value in gcloud builds submit

I'm trying to run a cloud build on my GCP project:

gcloud builds submit src --tag=eu.gcr.io/<PROJECT>/<APP_NAME>:latest --gcs-source-staging-dir=<BUILD_BUCKET>/runstage --gcs-log-dir=<BUILD_BUCKET>/logs --project=<PROJECT>

This worked fine yesterday but now I get:

ERROR: (gcloud.builds.submit) value for field [bucket] in collection [storage.objects] is required but was not provided

Am I missing something here?

I have reproduced the issue and I also got the same error. I resolved it by using the following command:

gcloud builds submit --gcs-source-staging-dir="gs://<BUILD_BUCKET>/runstage" --gcs-log-dir="gs://<BUILD_BUCKET>/logs" --tag=eu.gcr.io/<PROJECT>/<APP_NAME>:latest  --project=<PROJECT> 

Make sure to call Dockerfile explicitly in your cloudbuild.yaml file. For example :

steps:
- name: 'gcr.io/cloud-builders/docker'
  args: [ 'build', '-t', 'eu.gcr.io/<PROJECT>/<APP_NAME>:latest', ‘-f’, 'Dockerfile' ]

Just add gs:// before the name of your bucket.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM