Skip to content

Instantly share code, notes, and snippets.

@oliverlabs
Created October 13, 2022 15:21
Show Gist options
  • Save oliverlabs/6a7662a43a59b79fcc1a43f2889e3153 to your computer and use it in GitHub Desktop.
Save oliverlabs/6a7662a43a59b79fcc1a43f2889e3153 to your computer and use it in GitHub Desktop.
Azure DevOps Bicep Deploy Starter Pipeline
trigger:
- main
name: Deploy Bicep files
variables:
vmImageName: 'ubuntu-latest'
azureServiceConnection: 'myServiceConnection'
resourceGroupName: 'Bicep'
location: 'eastus'
templateFile: 'main.bicep'
pool:
vmImage: $(vmImageName)
steps:
- task: AzureCLI@2
inputs:
azureSubscription: $(azureServiceConnection)
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
az --version
az group create --name $(resourceGroupName) --location $(location)
az deployment group create --resource-group $(resourceGroupName) --template-file $(templateFile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment