How can I save google cloud build step text output to file

前端 未结 2 1668
小蘑菇
小蘑菇 2020-12-18 21:27

I\'m trying to use google cloud build. At one step, I need to get a list of all running compute instances.

- name: gcr.io/cloud-builders/gcloud
  args: [\'co         


        
2条回答
  •  轮回少年
    2020-12-18 22:27

    In addition to other answers, to do cmd > foo.txt, you need to override the build entrypoint to bash (or sh):

    - name: gcr.io/cloud-builders/gcloud
      entrypoint: /bin/bash
      args: ['-c', 'gcloud compute instances list > gce-list.txt']
    

提交回复
热议问题