I am trying to execute a task using Azure CLI and bash in Azure Devops. I am using Azure CLI task v.2 and choosing shell as script type as below. I want to use pipeline variables in bash script. I run the command below inside the script:
#!/bin/bash
az role assignment create --role "Lab Admin" --assignee $(ownerEmail) -g $(rgName)
and i got the error below:
line 2: ownerEmail: command not found
line 2: rgName: command not found
I don't understand. Normally, i should be able to use azure cli in a bash script. Does anybody have an idea?