Using Azure DevOps Pipeline Variables in PowerShell Script Files
Azure Pipelines inherently provides the ability for PowerShell scripts to be defined and executed inline.
1- task: AzureCLI@2
2 displayName: Bicep apply
3 inputs:
4 azureSubscription: MyAzureDevOpsConnectionName
5 scriptType: pscore
6 scriptLocation: inlineScript
7 inlineScript: az deployment group create --resource-group $(AZ_PLATFORM_RESOURCE_GROUP_NAME) --name $(AZ_DEPLOYMENT_NAME)-$(AZ_ENV_NAME)
Unfortunately, this can become very confusing in many situations and also repetitive, since, for example, an Azure Bicep deployment task is required in several stages, so that the task is repeated accordingly.
Read Blog Post
