Skip to content

Commit 0f82ba6

Browse files
committed
CI: remove light-aws-builder specs, use binary from image.
These specs moved to that pipeline, and the docker image now contains the `light-aws-builder` binary. Also contains: - shellcheck cleanup - removes aws-light-stemcell-builder src
1 parent 0488435 commit 0f82ba6

17 files changed

Lines changed: 91 additions & 509 deletions

ci/pipelines/publisher.yml

Lines changed: 17 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,29 @@
33
#@yaml/text-templated-strings
44
---
55

6-
#@ def build_light_aws_stemcell_new(stemcell_os, stemcell_version, builder_src, input_stemcell, output_stemcell, prefix, region, bucket_prefix, tag, ami_destinations, efi, ami_excluded_destinations):
6+
#@ def build_light_aws_stemcell_new(stemcell_os, stemcell_version, prefix, efi, ami_destinations, ami_excluded_destinations):
77
do:
88
- in_parallel:
9-
- get: (@= input_stemcell @)
9+
- get: (@= prefix @)-input-stemcell
1010
params:
1111
include_files:
1212
- bosh-stemcell-*-aws-xen-hvm-(@= stemcell_os @)*.tgz
1313
resource: candidate-(@= stemcell_os @)-stemcell-(@= stemcell_version @)
1414
trigger: true
1515
version: every
16-
#@ if tag != "":
17-
tags:
18-
- (@= tag @)
19-
#@ end
20-
- get: (@= builder_src @)
21-
passed:
22-
- test-aws-unit
23-
- test-aws-integration
24-
- test-aws-drivers
25-
resource: light-aws-builder-src
26-
#@ if tag != "":
27-
tags:
28-
- (@= tag @)
29-
#@ end
30-
- task: build-(@= region @)-stemcell
16+
- task: build-(@= prefix @)-stemcell
3117
file: bosh-stemcells-ci/ci/tasks/light-aws/build.yml
3218
image: light-stemcell-builder-registry-image
3319
input_mapping:
34-
builder-src: (@= builder_src @)
35-
input-stemcell: (@= input_stemcell @)
20+
input-stemcell: (@= prefix @)-input-stemcell
3621
output_mapping:
37-
light-stemcell: (@= output_stemcell @)
22+
light-stemcell: (@= prefix @)-light-stemcell
3823
params:
3924
AWS_PAGER:
4025
ami_access_key: ((aws_publish_(@= prefix @)_access_key))
4126
ami_secret_key: ((aws_publish_(@= prefix @)_secret_key))
42-
ami_region: ((aws_publish_(@= region @)_region))
43-
ami_bucket_name: ((aws_publish_(@= bucket_prefix @)_bucket))
27+
ami_region: ((aws_publish_(@= prefix @)_region))
28+
ami_bucket_name: ((aws_publish_(@= prefix @)_bucket))
4429
ami_description: Light Stemcell Builder Prod AMI
4530
#@ if ami_destinations != "":
4631
ami_destinations: (@= ami_destinations @)
@@ -55,10 +40,6 @@ do:
5540
ami_visibility: public
5641
S3_API_ENDPOINT: storage.googleapis.com
5742
efi: (@= str(efi).lower() @)
58-
#@ if tag != "":
59-
tags:
60-
- (@= tag @)
61-
#@ end
6243
#@ end
6344

6445
#@yaml/text-templated-strings
@@ -94,17 +75,9 @@ params:
9475

9576
#@yaml/text-templated-strings
9677
---
97-
anchors:
98-
ci_bot:
99-
email: &ci_bot_email bots@cloudfoundry.org
100-
name: &ci_bot_name CI Bot
101-
10278
groups:
10379
- name: all
10480
jobs:
105-
- test-aws-unit
106-
- test-aws-drivers
107-
- test-aws-integration
10881
- build-light-aws-(@= data.values.stemcell_details.os_name @)-(@= str(data.values.stemcell_details.major_version) @)
10982
- build-light-google-(@= data.values.stemcell_details.os_name @)-(@= str(data.values.stemcell_details.major_version) @)
11083
- publish-(@= data.values.stemcell_details.os_name @)-(@= str(data.values.stemcell_details.major_version) @)
@@ -120,7 +93,6 @@ groups:
12093
- publish-(@= data.values.stemcell_details.os_name @)-(@= str(data.values.stemcell_details.major_version) @)
12194
- name: cleanup-aws-light-stemcells
12295
jobs:
123-
- cleanup-light-aws-builder-test-amis
12496
- cleanup-published-aws-light-stemcells-older-than-three-years
12597
- cleanup-unpublished-(@= data.values.stemcell_details.os_name @)-aws-light-stemcells
12698

@@ -145,104 +117,18 @@ jobs:
145117
- #@ cleanup_unpublished_light_stemcells("us-gov", "us-gov")
146118
#!- #@ cleanup_unpublished_light_stemcells("cn", "cn_north")
147119

148-
- name: test-aws-unit
149-
plan:
150-
- get: bosh-stemcells-ci
151-
- get: bosh-integration-registry-image
152-
- get: builder-src
153-
resource: light-aws-builder-src
154-
trigger: true
155-
- file: bosh-stemcells-ci/ci/tasks/light-aws/test-unit.yml
156-
image: bosh-integration-registry-image
157-
task: test
158-
serial: true
159-
160-
- name: test-aws-drivers
161-
plan:
162-
- get: bosh-stemcells-ci
163-
- get: bosh-integration-registry-image
164-
- get: builder-src
165-
resource: light-aws-builder-src
166-
trigger: true
167-
- file: bosh-stemcells-ci/ci/tasks/light-aws/test-drivers.yml
168-
image: bosh-integration-registry-image
169-
params:
170-
AWS_PAGER:
171-
aws_account_id: ((aws_test_account_id))
172-
access_key: ((aws_test_access_key))
173-
secret_key: ((aws_test_secret_key))
174-
bucket_name: ((aws_test_bucket_name))
175-
copy_region: ((aws_test_copy_region))
176-
region: ((aws_test_region))
177-
ami_fixture_id: ((aws_test_ami_fixture_id))
178-
private_ami_fixture_id: ((aws_test_private_ami_fixture_id))
179-
existing_snapshot_id: ((aws_test_snapshot_fixture_id))
180-
existing_volume_id: ((aws_test_volume_fixture_id))
181-
#! kms key id should be the one created in the region of "copy_region"
182-
kms_key_id: ((aws_test_kms_key_id))
183-
kms_multi_region_key: ((aws_test_kms_multi_region_key_id))
184-
kms_multi_region_key_replication_test: ((aws_test_kms_multi_region_replication_test_key_id))
185-
uploaded_machine_image_url: https://stemcell-test-publish.s3.eu-central-1.amazonaws.com/fixtures/root.img
186-
task: test
187-
attempts: 3
188-
serial: true
189-
190-
- name: test-aws-integration
191-
plan:
192-
- get: bosh-stemcells-ci
193-
- get: bosh-integration-registry-image
194-
- get: builder-src
195-
resource: light-aws-builder-src
196-
trigger: true
197-
- file: bosh-stemcells-ci/ci/tasks/light-aws/test-integration.yml
198-
image: bosh-integration-registry-image
199-
params:
200-
AWS_PAGER:
201-
access_key: ((aws_test_access_key))
202-
secret_key: ((aws_test_secret_key))
203-
bucket_name: ((aws_test_bucket_name))
204-
#! cn_access_key: ((test__cn_access_key))
205-
#! cn_bucket_name: ((test__cn_bucket_name))
206-
#! cn_region: ((test__cn_region))
207-
#! cn_secret_key: ((test__cn_secret_key))
208-
copy_region: ((aws_test_copy_region))
209-
region: ((aws_test_region))
210-
211-
task: test
212-
serial: true
213-
214-
- name: cleanup-light-aws-builder-test-amis
215-
plan:
216-
- get: every-week-on-monday
217-
trigger: true
218-
- get: bosh-stemcells-ci
219-
- get: bosh-integration-registry-image
220-
- task: cleanup-aws-test-amis
221-
file: bosh-stemcells-ci/ci/tasks/light-aws/cleanup-ami.yml
222-
image: bosh-integration-registry-image
223-
params:
224-
AWS_PAGER:
225-
ami_access_key: ((aws_test_access_key))
226-
ami_secret_key: ((aws_test_secret_key))
227-
ami_region: ((aws_test_region))
228-
ami_older_than_days: 1
229-
ami_keep_latest: 0
230-
snapshot_id: ((aws_test_snapshot_fixture_id))
231-
232120
- name: build-light-aws-(@= data.values.stemcell_details.os_name @)-(@= str(data.values.stemcell_details.major_version) @)
233121
plan:
234122
- get: bosh-stemcells-ci
235-
- get: light-stemcell-builder-registry-image
123+
- get: aws-light-stemcell-builder-registry-image
236124
- get: bosh-integration-registry-image
237125
- in_parallel:
238126
- do:
239-
- #@ build_light_aws_stemcell_new(data.values.stemcell_details.os_name, str(data.values.stemcell_details.major_version), "us-gov-builder-src", "us-gov-input-stemcell", "us-gov-light-stemcell", "us-gov", "us-gov", "us-gov", "", "", data.values.stemcell_details.use_efi, "")
240-
- #@ build_light_aws_stemcell_new(data.values.stemcell_details.os_name, str(data.values.stemcell_details.major_version), "us-builder-src", "us-input-stemcell", "us-light-stemcell", "us", "us", "us", "", "", data.values.stemcell_details.use_efi, '["me-central-1"]')
241-
- file: bosh-stemcells-ci/ci/tasks/light-aws/us-gov-merge-builds.yml
242-
image: light-stemcell-builder-registry-image
243-
input_mapping:
244-
builder-src: us-builder-src
245-
task: merge-builds
127+
- #@ build_light_aws_stemcell_new(data.values.stemcell_details.os_name, str(data.values.stemcell_details.major_version), "us-gov", data.values.stemcell_details.use_efi, "", "")
128+
- #@ build_light_aws_stemcell_new(data.values.stemcell_details.os_name, str(data.values.stemcell_details.major_version), "us", data.values.stemcell_details.use_efi, "", '["me-central-1"]')
129+
- task: merge-builds
130+
file: bosh-stemcells-ci/ci/tasks/light-aws/us-gov-merge-builds.yml
131+
image: aws-light-stemcell-builder-registry-image
246132
- do:
247133
- in_parallel:
248134
- get: bosh-cpi-src
@@ -285,7 +171,6 @@ jobs:
285171
file: bosh-stemcells-ci/ci/tasks/light-aws/run-upload-test.yml
286172
image: bosh-integration-registry-image
287173
input_mapping:
288-
builder-src: us-builder-src
289174
stemcell: light-stemcell
290175
ensure:
291176
do:
@@ -315,8 +200,8 @@ jobs:
315200
files:
316201
- light-stemcell/*.tgz
317202
options:
318-
author_email: *ci_bot_email
319-
author_name: *ci_bot_name
203+
author_email: &ci_bot_email bots@cloudfoundry.org
204+
author_name: &ci_bot_name CI Bot
320205
message: 'candidate (light aws): (@= data.values.stemcell_details.os_name @)/(@= str(data.values.stemcell_details.major_version) @).x'
321206
version: us-input-stemcell/.resource/version
322207
serial: true
@@ -334,12 +219,11 @@ jobs:
334219
- get: bosh-stemcells-ci
335220
- get: bosh-cpi-release
336221
resource: bosh-google-cpi-release
337-
- get: light-stemcell-builder-registry-image
338222
- get: gce-cpi-release-registry-image
339223
- get: bosh-integration-registry-image
340224
- task: make-raw-from-heavy-stemcell
341225
file: bosh-stemcells-ci/ci/tasks/light-google/make-raw-from-heavy-stemcell.yml
342-
image: light-stemcell-builder-registry-image
226+
image: gce-cpi-release-registry-image
343227
params:
344228
BUCKET_NAME: bosh-gce-raw-stemcells-new
345229
STEMCELL_BUCKET_PATH: bosh-gce-light-stemcells
@@ -623,12 +507,6 @@ resources:
623507
- ci
624508
uri: https://github.com/cloudfoundry/bosh-linux-stemcell-builder.git
625509

626-
- name: light-aws-builder-src
627-
type: git
628-
source:
629-
branch: master
630-
uri: https://github.com/cloudfoundry/bosh-aws-light-stemcell-builder
631-
632510
- name: bosh-aws-cpi-release
633511
type: git
634512
source:
@@ -854,7 +732,7 @@ resources:
854732
username: ((github_read_write_packages.username))
855733
password: ((github_read_write_packages.password))
856734

857-
- name: light-stemcell-builder-registry-image
735+
- name: aws-light-stemcell-builder-registry-image
858736
type: registry-image
859737
source:
860738
repository: bosh/light-stemcell-builder

0 commit comments

Comments
 (0)