Closed6

ERROR: gcloud crashed (AttributeError): 'NoneType' object has no attribute 'get'

omihirofumiomihirofumi

gcloud deploy applyしたら↓が出た。

$ gcloud deploy apply --file=clouddeploy.yaml --region=asia-northeast1 --project=hoge
ERROR: gcloud crashed (AttributeError): 'NoneType' object has no attribute 'get'

If you would like to report this issue, please run the following command:
  gcloud feedback

To check gcloud for common problems, please run the following command:
  gcloud info --run-diagnostics
omihirofumiomihirofumi

あ、yamlファイルがダメだった。

apiVersion: deploy.cloud.google.com/v1
kind: DeliveryPipeline
metadata:
  name: xxx
description: xx
serialPipeline:
  stages:
    - targetId: xxx
      profiles: [main]
---

apiVersion: deploy.cloud.google.com/v1
kind: Target
metadata:
  name: xxx
requireApproval: false
run:
  location: projects/xxx/locations/asia-northeast1
---  <- これいらないわ
omihirofumiomihirofumi

できた。

apiVersion: deploy.cloud.google.com/v1
kind: DeliveryPipeline
metadata:
  name: xxx
description: xx
serialPipeline:
  stages:
    - targetId: xxx
      profiles: [main]
---

apiVersion: deploy.cloud.google.com/v1
kind: Target
metadata:
  name: xxx
requireApproval: false
run:
  location: projects/xxx/locations/asia-northeast1
このスクラップは3日前にクローズされました