-
Notifications
You must be signed in to change notification settings - Fork 29
/
azure_bicep-pipeline.yml
57 lines (50 loc) · 1.98 KB
/
azure_bicep-pipeline.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
trigger: none
pr: none
name: Deploy Bicep Files
variables:
vmImageName: 'ubuntu-latest'
azureServiceConnection: 'Azure Subscription (VSENT)'
resourceGroupName: 'DevSecOpsDemo'
location: 'Canada Central'
templateFile: '$(System.DefaultWorkingDirectory)/Infrastructure-Source-Code/AzureBicep-Examples/000/01-hello-world/main.bicep'
pool:
vmImage: $(vmImageName)
stages :
- stage: deployBicep
displayName: Deploy Bicep Files
jobs:
- job: BicepConfigure
displayName: "Bicep Deployment (Resource Group Level)"
steps:
- task: AzureResourceManagerTemplateDeployment@3
displayName: 'Deploy Bicep Template'
inputs:
deploymentScope: 'Resource Group'
azureResourceManagerConnection: '$(azureServiceConnection)'
action: 'Create Or Update Resource Group'
resourceGroupName: '$(resourceGroupName)'
location: '$(location)'
templateLocation: 'Linked artifact'
csmFile: '$(templateFile)'
overrideParameters: -yourName Adin #'-storageAccountType Standard_LRS'
deploymentMode: 'Incremental'
deploymentName: 'DeployPipelineTemplate'
# - task: Bash@3
# displayName: 'Install Bicep'
# inputs:
# targetType: inline
# script: |
# curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
# chmod +x ./bicep
# ./bicep build $(System.DefaultWorkingDirectory)/Infrastructure-Source-Code/AzureBicep-Examples/000/01-hello-world/main.bicep
# - task: AzureCLI@2
# displayName: 'Deploy Bicep Configuration'
# inputs:
# azureSubscription: 'tamopstf'
# scriptType: bash
# scriptLocation: inlineScript
# addSpnToEnvironment: true
# inlineScript: |
# #!/bin/bash
# az group create -l uksouth -n bicep-rg
# az deployment group create -f $(System.DefaultWorkingDirectory)/Infrastructure-Source-Code/AzureBicep-Examples/000/01-hello-world/main.json -g bicep-rg