-
Notifications
You must be signed in to change notification settings - Fork 6
/
pipeline.yml
220 lines (203 loc) · 5.91 KB
/
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
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
resource_types:
#- name: pivnet
# type: docker-image
# source:
# repository: pivotalcf/pivnet-resource
# tag: latest-final
- name: file-url
type: docker-image
source:
repository: pivotalservices/concourse-curl-resource
tag: latest
resources:
- name: windows-stemcell-concourse-image
type: docker-image
source:
repository: cfcommunity/windows-stemcell-concourse
tag: latest
- name: pipeline-resources
type: git
source:
uri: ((tasks.uri))
branch: ((tasks.branch))
check_every: 1h
#- name: stembuild-release
# type: pivnet
# source:
# api_token: ((pivnet-token))
# product_slug: stemcells-windows-server
# product_version: ((os-version)).(.*)
# sort_by: semver
- name: stembuild-release
type: github-release
source:
owner: cloudfoundry-incubator
repository: stembuild
tag_filter: ((os-version)).(.*)
check_every: 1h
- name: lgpo
type: file-url
source:
url: https://download.microsoft.com/download/8/5/C/85C25433-A1B0-4FFA-9429-7E023E7DA8D8/LGPO.zip
filename: LGPO.zip
- name: autounattend
type: git
source:
uri: ((tasks.uri))
branch: ((tasks.branch))
check_every: 1h
- name: stemcell-store
type: s3
source:
access_key_id: ((s3.access-key-id))
secret_access_key: ((s3.secret-access-key))
bucket: ((s3.bucket))
#versioned_file: stemcell/bosh-stemcell-2019.12-vsphere-esxi-windows2019-go_agent.tgz
regexp: stemcell/bosh-stemcell-(.*)-vsphere-esxi-(.*)-go_agent.tgz
endpoint: ((s3.endpoint))
- name: one-time-trigger
type: time
source:
interval: 999999h
vcenter-params: &vcenter-params
vcenter_ca_certs: ((vcenter-ca-certs))
vcenter_host: ((vcenter-host))
vcenter_username: ((vcenter-username))
vcenter_password: ((vcenter-password))
vcenter_datacenter: ((vcenter-datacenter))
vm-params: &vm-params
base_vm_name: ((base-vm-name))
vm_folder: ((vm-folder))
vm_datastore: ((vm-datastore))
vm_host: ((vm-host))
vm_cpu: ((vm-cpu))
vm_network: ((vm-network))
vm_disk_gb: ((vm-disk-gb))
vm_memory_mb: ((vm-memory-mb))
vm_guest_os_id: ((vm-guest-os-id))
vm_net_adapter: ((vm-net-adapter))
vm_resource_pool: ((vm-resource-pool))
esxi_version: ((esxi-version))
firmware_type: ((firmware-type))
disk_controller_type: ((disk-controller-type))
iso_datastore: ((iso-datastore))
iso_path_in_datastore: ((iso-path-in-datastore))
timeout: ((timeout))
vmware_tools_status: ((vmware-tools-status))
os-params: &os-params
operating_system_name: ((operating-system-name))
product_key: ((product-key))
ip_address: ((ip-address))
subnet_mask: ((subnet-mask))
language: ((language))
gateway_address: ((gateway-address))
dns_address: ((dns-address))
admin_password: ((admin-password))
vmware_tools_uri: ((vmware-tools-uri))
windows_update_module_uri: ((windows-update-module-uri))
windows_install_timeout: ((windows-install-timeout))
######################
jobs:
- name: create-base
serial: true
serial_groups: [ base ]
plan:
- in_parallel:
- get: one-time-trigger
trigger: true
- get: windows-stemcell-concourse-image
- get: pipeline-resources
- get: autounattend
- task: create-base
file: pipeline-resources/tasks/create-base.yml
image: windows-stemcell-concourse-image
input_mapping:
autounattend: autounattend
pipeline-resources: pipeline-resources
params:
<<: *vcenter-params
<<: *vm-params
<<: *os-params
- name: update-base
serial: true
serial_groups: [ base ]
plan:
- in_parallel:
- get: one-time-trigger
passed: [ create-base ]
- get: windows-stemcell-concourse-image
- get: pipeline-resources
- get: stembuild-release
trigger: true #start the pipeline whenever there is a new stembuild
params:
globs:
- stembuild-linux-*
- task: update-base
file: pipeline-resources/tasks/update-base.yml
image: windows-stemcell-concourse-image
input_mapping:
pipeline-resources: pipeline-resources
params:
<<: *vcenter-params
<<: *vm-params
<<: *os-params
- name: clone-base
serial: true
plan:
- in_parallel:
- get: windows-stemcell-concourse-image
- get: pipeline-resources
trigger: true
passed: [update-base]
- get: stembuild-release
passed: [update-base]
params:
globs:
- stembuild-linux-*
- task: clone-base
file: pipeline-resources/tasks/clone-base.yml
image: windows-stemcell-concourse-image
input_mapping:
stembuild: stembuild-release
pipeline-resources: pipeline-resources
params:
<<: *vcenter-params
<<: *vm-params
- name: stembuild
serial: true
plan:
- in_parallel:
- get: windows-stemcell-concourse-image
- get: pipeline-resources
trigger: true
passed: [clone-base]
- get: lgpo
- get: stembuild-release
passed: [clone-base]
params:
globs:
- stembuild-linux-*
- task: construct
file: pipeline-resources/tasks/construct.yml
image: windows-stemcell-concourse-image
input_mapping:
stembuild: stembuild-release
lgpo: lgpo
pipeline-resources: pipeline-resources
params:
<<: *vcenter-params
<<: *vm-params
<<: *os-params
- task: package
file: pipeline-resources/tasks/package.yml
image: windows-stemcell-concourse-image
input_mapping:
stembuild: stembuild-release
pipeline-resources: pipeline-resources
params:
<<: *vcenter-params
<<: *vm-params
<<: *os-params
- put: stemcell-store
params:
file: stemcell/*.tgz