6

我不明白这个错误信息是什么意思。它发生在我的构建结束时,当构建完成并且图像被标记时。这是日志的结尾:

Step 17/18 : WORKDIR /var/www
---> 0cb8de2acd8f
Removing intermediate container 7e7838eac6fb
Step 18/18 : CMD bundle exec puma -C config/puma.rb
---> Running in 9089eb79192b
---> 890a53af5964
Removing intermediate container 9089eb79192b
Successfully built 890a53af5964
Successfully tagged us.gcr.io/foo-staging/foobar:latest
ERROR
ERROR: failed to find one or more images after execution of build steps: ["us.gcr.io/foo-staging/foobar:a2122696c92f430529197dea8213c96b3eee8ee4"]

这是我的cloudbuild.yaml

steps:
- name: 'gcr.io/cloud-builders/docker'
  args: [ 'build', '-t', 'us.gcr.io/$PROJECT_ID/foobar', '.' ]
images:
- 'us.gcr.io/$PROJECT_ID/foobar:$COMMIT_SHA'
- 'us.gcr.io/$PROJECT_ID/foobar:latest'
timeout: 3600s

我想这可能是暂时的失败,但我重试了构建,它又发生了。

4

1 回答 1

14

啊,我需要在构建步骤中标记构建:

steps:
- name: 'gcr.io/cloud-builders/docker'
  args: [ 'build', '-t', 'us.gcr.io/$PROJECT_ID/foobar:$COMMIT_SHA', '-t', 'us.gcr.io/$PROJECT_ID/foobar:latest', '.' ]
images:
- 'us.gcr.io/$PROJECT_ID/foobar:$COMMIT_SHA'
- 'us.gcr.io/$PROJECT_ID/foobar:latest'
timeout: 3600s
于 2017-12-13T02:02:56.313 回答