-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbicep1.yml
38 lines (33 loc) · 1.02 KB
/
bicep1.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Deploy Bicep files
trigger: none
# - main
variables:
resourceGroupName: 'rg-bicep-demo-0017'
location: 'australiasoutheast'
webAppName: 'bicep0017'
templateFile: '01-bicep-webapp/webapp-linux.bicep'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: AzureCLI@2
displayName: Preview Bicep Changes
inputs:
azureSubscription: 'muaban_azure'
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
az --version
az group create --name $(resourceGroupName) --location $(location)
az deployment group what-if --resource-group $(resourceGroupName) \
--template-file $(templateFile) \
--parameters webAppName=$(webAppName)
- task: AzureCLI@2
displayName: Deploy Bicep To Azure
inputs:
azureSubscription: 'muaban_azure'
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
az deployment group create --resource-group $(resourceGroupName) \
--template-file $(templateFile) \
--parameters webAppName=$(webAppName)