-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines-agentless.yml
186 lines (171 loc) · 5.58 KB
/
azure-pipelines-agentless.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
parameters:
- name: csv_file_name
displayName: Csv File Name
type: string
default: Pilot.DEV.csv
variables:
- name: agent_script_path
value: "IaaSMigration/Agentless/Agentless VMware automation"
- name: csv_file_path
value: "IaaSMigration/Agentless/Applications/${{ parameters.csv_file_name }}"
- name: agent
value: "Agentless"
- name: ChannelName
value: "${{ parameters.Teams }}"
trigger: none
pool:
vmImage: "windows-latest"
name: Migrate-${{ parameters.csv_file_name }}-Agentless-$(Date:yyyyMMdd)
stages:
- stage: Build
jobs:
- job: BuildArtifact
steps:
- template: azure-package.yml
- stage: StartReplication
condition: succeeded('Build')
jobs:
- deployment: StartReplication
environment: "StartReplication"
variables:
- name: root_path
value: $(Pipeline.Workspace)\Artifacts
- name: agent_type
value: $(agent)
- name: PowerShell
value: $(root_path)/$(agent_script_path)/AzMigrate_StartReplication.ps1
- name: DisplayName
value: Start Replication
- name: TeamsChannelName
value: $(ChannelName)
strategy:
runOnce:
deploy:
steps:
- template: azure-jobs.yml
- stage: UpdateMachineProperties
condition: succeeded('Build')
jobs:
- deployment: UpdateMachineProperties
environment: "UpdateMachineProperties"
variables:
- name: root_path
value: $(Pipeline.Workspace)\Artifacts
- name: agent_type
value: $(agent)
- name: PowerShell
value: $(root_path)/$(agent_script_path)/AzMigrate_UpdateReplicationStatus.ps1, $(root_path)/$(agent_script_path)/AzMigrate_UpdateMachineProperties.ps1
- name: DisplayName
value: Update Machine Properties
- name: TeamsChannelName
value: $(ChannelName)
strategy:
runOnce:
deploy:
steps:
- template: azure-jobs.yml
- stage: StartTestMigration
condition: succeeded('Build')
jobs:
- deployment: StartTestMigration
environment: "StartTestMigration"
variables:
- name: root_path
value: $(Pipeline.Workspace)\Artifacts
- name: agent_type
value: $(agent)
- name: PowerShell
value: $(root_path)/$(agent_script_path)/AzMigrate_UpdateReplicationStatus.ps1, $(root_path)/$(agent_script_path)/AzMigrate_StartTestMigration.ps1
- name: DisplayName
value: Start Test Migration
- name: TeamsChannelName
value: $(ChannelName)
strategy:
runOnce:
deploy:
steps:
- template: azure-jobs.yml
- stage: CleanUpTestMigration
condition: succeeded('Build')
jobs:
- deployment: CleanUpTestMigration
environment: "CleanUpTestMigration"
variables:
- name: root_path
value: $(Pipeline.Workspace)\Artifacts
- name: agent_type
value: $(agent)
- name: PowerShell
value: $(root_path)/$(agent_script_path)/AzMigrate_UpdateReplicationStatus.ps1, $(root_path)/$(agent_script_path)/AzMigrate_CleanUpTestMigration.ps1
- name: DisplayName
value: Clean UpTest Migration
- name: TeamsChannelName
value: $(ChannelName)
strategy:
runOnce:
deploy:
steps:
- template: azure-jobs.yml
- stage: StartMigration
condition: succeeded('Build')
jobs:
- deployment: StartMigration
environment: "StartMigration"
variables:
- name: root_path
value: $(Pipeline.Workspace)\Artifacts
- name: agent_type
value: $(agent)
- name: PowerShell
value: $(root_path)/$(agent_script_path)/AzMigrate_UpdateReplicationStatus.ps1, $(root_path)/$(agent_script_path)/AzMigrate_StartMigration.ps1
- name: DisplayName
value: Start Migration
- name: TeamsChannelName
value: $(ChannelName)
strategy:
runOnce:
deploy:
steps:
- template: azure-jobs.yml
- stage: EnableServices
condition: succeeded('Build')
jobs:
- deployment: EnableServices
environment: "EnableServices"
variables:
- name: root_path
value: $(Pipeline.Workspace)\Artifacts
- name: agent_type
value: $(agent)
- name: PowerShell
value: $(root_path)/IaaSMigration/Custom/Enable-AzBackup.ps1
- name: DisplayName
value: Enable Services
- name: TeamsChannelName
value: $(ChannelName)
strategy:
runOnce:
deploy:
steps:
- template: azure-jobs.yml
- stage: StopReplication
condition: succeeded('Build')
jobs:
- deployment: StopReplication
environment: "StopReplication"
variables:
- name: root_path
value: $(Pipeline.Workspace)\Artifacts
- name: agent_type
value: $(agent)
- name: PowerShell
value: $(root_path)/$(agent_script_path)/AzMigrate_StopReplication.ps1
- name: DisplayName
value: Stop Replication
- name: TeamsChannelName
value: $(ChannelName)
strategy:
runOnce:
deploy:
steps:
- template: azure-jobs.yml