【问题标题】:Error when assigning the Storage Admin IAM role to my service account将 Storage Admin IAM 角色分配给我的服务帐户时出错
【发布时间】:2020-08-04 14:38:46
【问题描述】:

我有以下脚本(我已经更改了 AZURE_PIPELINES_PUBLISHER):

AZURE_PIPELINES_PUBLISHER=azure-pipelines-publisher@$GOOGLE_CLOUD_PROJECT.iam.gserviceaccount.com

gcloud projects add-iam-policy-binding $GOOGLE_CLOUD_PROJECT \
    --member serviceAccount:$AZURE_PIPELINES_PUBLISHER \
    --role roles/storage.admin

我在 Azure DevOps 中的 Docker 推送任务的“参数”字段上编写此脚本,当我运行构建时,此任务显示以下错误:

未知标志:--member

我从Google Cloud documentation获得脚本。

脚本有什么问题?

【问题讨论】:

  • --membergcloud 命令的标志。因此,可能将参数传递给某个 docker 客户端的 docker 任务将不知道 --member 的含义。你知道你使用的图片的CMD是什么吗?

标签: docker kubernetes google-cloud-platform azure-devops devops


【解决方案1】:

根据教程,gcloud 命令应该在 Cloud Shell 中运行。这不是 Docker 推送任务的“参数”。它应该在您的生产项目中创建一个 Google Cloud 服务帐户并在您配置 Azure Pipelines 以构建和发布容器映像之前分配角色。

【讨论】:

  • 你查看我的回复了吗?有用吗?
猜你喜欢
  • 1970-01-01
  • 2021-01-22
  • 1970-01-01
  • 1970-01-01
  • 2020-12-17
  • 1970-01-01
  • 2020-02-18
  • 2020-12-23
  • 2020-08-22
相关资源
最近更新 更多