GCE构建失败

时间:2017-03-22 15:02:53

标签: docker google-container-registry gcp google-compute-engine

我在GCE / GCR上使用新的触发版本的docker镜像,并且构建似乎总是因超时而失败。成功构建泊坞窗图像时,似乎无法将图像推送到GCR。日志如下:

7f88c2269765: Pushed
5d6cbe0dbcf9: Pushed 
e00d971f9164: Pushed 
0dc1f7b171b3: Pushed 
86f67bb3dbbe: Pushed 
ba89c4349922: Pushed 
4c105bb07555: Pushed 
a5fc5fa13b1c: Pushed 
2a2b5addcfa7: Pushed 
4f15d176b911: Pushed 
9685991d91de: Pushed 
5d6cbe0dbcf9: Waiting 
e00d971f9164: Waiting 
0dc1f7b171b3: Waiting 
86f67bb3dbbe: Waiting 
4c105bb07555: Waiting 
ba89c4349922: Waiting 
7f88c2269765: Waiting 
5d6cbe0dbcf9: Preparing 
e00d971f9164: Preparing 
0dc1f7b171b3: Preparing 
86f67bb3dbbe: Preparing 
4c105bb07555: Preparing 
ba89c4349922: Preparing 
7f88c2269765: Preparing 
c70c29a95bd1: Preparing 
a5fc5fa13b1c: Preparing 
4f15d176b911: Preparing 
9685991d91de: Preparing 
2a2b5addcfa7: Preparing 
The push refers to a repository [gcr.io/repo-compute/github-platform/ap] 
Pushing gcr.io/repo-compute/github-platform/ap:8a7ce4a87b24ac8f2c7b00b5719743b7cc81de5b 
PUSH Successfully built e1b3f1ab6e1d Removing intermediate container d696b84e6731

1 个答案:

答案 0 :(得分:3)

使用超时选项并将默认值从10分钟增加:

- name: 'gcr.io/cloud-builders/docker'
  args: ['build', '-f=./foo/bar/Dockerfile', '--tag=gcr.io/foo-compute/continuous-deploy/deploy:$COMMIT_SHA', '.']
  waitFor: ['-']
images:
  - 'gcr.io/foo-compute/continuous-deploy/deploy:$COMMIT_SHA'
timeout: '1200s'

注意:超时配置为秒: source