[英]Missing unknown value in gcloud builds submit
I'm trying to run a cloud build on my GCP project:我正在尝试在我的 GCP 项目上运行云构建:
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.确保在您的 cloudbuild.yaml 文件中显式调用 Dockerfile。 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.只需在存储桶名称前添加
gs://
即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.