Cloud Build,maven包,无目标文件夹

时间:2019-01-02 22:41:46

标签: docker google-cloud-build

__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)工作吗?

1 个答案:

答案 0 :(得分:0)

类似于此处的回答:Cloud Build fails to build the the simple build step with maven