forked from AErmie/DevSecOps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-bicep-pipeline.yml
37 lines (32 loc) · 1.07 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
name: $(BuildDefinitionName)_$(date:yyyyMMdd)$(rev:.r)
trigger:
batch: true
branches:
include:
- master
# Don't run against PRs
pr: none
stages :
- stage: deployBicep
jobs:
- job: "BicepConfigure"
steps:
- 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)/BicepFiles/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)/BicepFiles/main.json -g bicep-rg