__qualname__
当我在本地顶部运行这两个命令时,我确实有 target 文件夹和 docker 文件夹,以及 image-name 文件。它
在此步骤上失败: ..
- name: 'gcr.io/cloud-builders/mvn'
args: ['clean',
'package',
'-Ddockerfile.skip',
'-DskipTests'
]
- name: 'gcr.io/cloud-builders/mvn'
args: ['dockerfile:build',
'-Ddockerfile.skip',
'-DskipTests'
]
猫:/ workspace / target / docker / image-name:无此类文件或目录
我尝试了target / docker,app / target / docker
在我的Dockerfile中:
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args:
- -c
- |
docker push $(cat /workspace/target/docker/image-name)
问题:如何查看目标文件夹,如何制作 docker push $ {cat / workspace / target / docker / image-name)工作吗?
答案 0 :(得分:0)
类似于此处的回答:Cloud Build fails to build the the simple build step with maven
我还想知道docker步骤是否没有掌握dockerfile插件所产生的内容,dockerfile:push是否起作用?
steps:
- name: 'gcr.io/cloud-builders/mvn'
args: ['dockerfile:build']
- name: 'gcr.io/cloud-builders/mvn'
args: ['dockerfile:push']