I have the following script ( I've change the 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:
unknown flag: --member
I get the script from the Google Cloud documentation.
What's wrong in the script?
From the tutorial, gcloud
command should run in the Cloud Shell. It's not 'Arguments' of the Docker push task. 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.