-
-
Notifications
You must be signed in to change notification settings - Fork 90
/
buildagent-generation-update-vmss.yml
50 lines (47 loc) · 1.56 KB
/
buildagent-generation-update-vmss.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
parameters:
- name: variable_group_name
displayName: Variable Group
type: string
default: 'Image Generation Variables'
- name: agent_pool
displayName: Agent Pool
type: string
default: CI Windows2019
- name: repository_base_path
displayName: Scripts Path
type: string
default: .
- name: vmss_names
displayName: VmssNames
type: string
jobs:
- job: updatevmss
displayName: Update Virtual Machine Scale Set
timeoutInMinutes: 600
cancelTimeoutInMinutes: 30
pool:
name: ${{ parameters.agent_pool }}
variables:
- name: ManagedImageName
value: $[stageDependencies.buildagent_template_vm.generate_image.outputs['setVars.ManagedImageNameOutput'] ]
- group: ${{ parameters.variable_group_name }}
- name: VmssNames
value: ${{ parameters.vmss_names }}
- group: ${{ parameters.variable_group_name }}
steps:
- checkout: self
- ${{ if ne(parameters.repository_base_path, '.') }}:
- checkout: ${{ parameters.repository_base_path }}
- task: PowerShell@2
displayName: 'Update Virtual Machine Scale Set'
inputs:
targetType: filePath
filePath: ${{ parameters.repository_base_path }}/scripts/update-vmss.ps1
arguments: -ClientId $(CLIENT_ID) `
-ClientSecret $(CLIENT_SECRET) `
-ResourceGroup $(AZURE_RESOURCE_GROUP) `
-AgentsResourceGroup $(AZURE_AGENTS_RESOURCE_GROUP) `
-SubscriptionId $(AZURE_SUBSCRIPTION) `
-TenantId $(AZURE_TENANT) `
-ManagedImageName $(ManagedImageName) `
-VmssNames $(VmssNames)