-
Notifications
You must be signed in to change notification settings - Fork 4
/
azure-pipelines.yml
76 lines (68 loc) · 2.43 KB
/
azure-pipelines.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
trigger:
branches:
include:
- '*'
stages:
- stage: Build
jobs:
- job: BuildJob
pool:
vmImage: windows-2019
steps:
- task: AzureResourceGroupDeployment@2
inputs:
ConnectedServiceName: 'MPN'
action: 'Create Or Update Resource Group'
resourceGroupName: 'ARMtesting'
location: 'West Europe'
csmFile: 'Deploymentfiles/StorageAccount/azuredeploy.json'
csmParametersFile: 'Deploymentfiles/StorageAccount/azuredeploy.parameters.json'
deploymentMode: 'Validation'
- task: AzureResourceGroupDeployment@2
inputs:
ConnectedServiceName: 'MPN'
action: 'Create Or Update Resource Group'
resourceGroupName: 'ARMtesting'
location: 'West Europe'
csmFile: 'Deploymentfiles/VirtualNetwork/Azuredeploy.json'
csmParametersFile: 'Deploymentfiles/VirtualNetwork/Azuredeploy.parameters.json'
deploymentMode: 'Validation'
- task: PowerShell@2
inputs:
targetType: Inline
script : |
Install-Module -Name ARMHelper -Force -Scope CurrentUser
Import-Module -Name ARMHelper
displayName: 'Prepair Agent'
- template: ARMHelperTemplate.yml
parameters:
resourceGroupName: 'StorageAccount_01'
deploymentFolder: Deploymentfiles\StorageAccount
- template: ARMHelperTemplate.yml
parameters:
resourceGroupName: 'VirtualNetwork_01'
deploymentFolder: Deploymentfiles\VirtualNetwork
- stage: Deploy
condition:
and(succeeded(), eq(variables['State'], 'Production'))
jobs:
- job: BuildJob
pool:
vmImage: windows-2019
steps:
- task: AzureResourceGroupDeployment@2
displayName: 'Azure Deployment:Create Or Update Resource Group action on OC-DC'
inputs:
azureSubscription: MPN
resourceGroupName: 'StorageAccount_01'
location: 'West Europe'
csmFile: 'Deploymentfiles/StorageAccount/azuredeploy.json'
csmParametersFile: 'Deploymentfiles/StorageAccount/AzureDeploy.parameters.json'
- task: AzureResourceGroupDeployment@2
displayName: 'Azure Deployment:Create Or Update Resource Group action on OC-DC'
inputs:
azureSubscription: MPN
resourceGroupName: 'VirtualNetwork_01'
location: 'West Europe'
csmFile: 'Deploymentfiles/VirtualNetwork/AzureDeploy.json'
csmParametersFile: 'Deploymentfiles/VirtualNetwork/AzureDeploy.parameters.json'