[英]Error when assigning the Storage Admin IAM role to my service account
I have the following script ( I've change the AZURE_PIPELINES_PUBLISHER ):我有以下脚本(我已经更改了 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
I write this script on 'Arguments' field of the Docker push task, in Azure DevOps, when i run the build, this task shows the following error:我在 Azure DevOps 中 Docker 推送任务的“参数”字段上编写此脚本,当我运行构建时,此任务显示以下错误:
unknown flag: --member未知标志:--member
I get the script from the Google Cloud documentation .我从Google Cloud 文档中获取脚本。
What's wrong in the script?剧本有什么问题?
From the tutorial, gcloud
command should run in the Cloud Shell.根据教程, gcloud
命令应该在 Cloud Shell 中运行。 It's not 'Arguments' of the Docker push task.这不是 Docker 推送任务的“参数”。 It's supposed creating a Google Cloud service account in your production project and assign the role before you configure Azure Pipelines to build and publish a container image.它应该在您的生产项目中创建一个 Google Cloud 服务帐户并分配角色,然后再配置 Azure 管道以构建和发布容器映像。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.