Skip to content

Commit 718a56e

Browse files
committed
ci: simplify cleanup_* functions
- use prefix, not prefix, and region - out of band: update credhub entry
1 parent c2e1e3c commit 718a56e

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

ci/pipelines/publisher.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,31 +44,31 @@ do:
4444

4545
#@yaml/text-templated-strings
4646
---
47-
#@ def cleanup_unpublished_light_stemcells(prefix, region):
47+
#@ def cleanup_unpublished_light_stemcells(prefix):
4848
task: cleanup-amis-in-(@= prefix @)
4949
file: bosh-stemcells-ci/ci/tasks/light-aws/cleanup-ami.yml
5050
image: bosh-integration-registry-image
5151
params:
5252
AWS_PAGER:
5353
ami_access_key: ((aws_publish_(@= prefix @)_access_key))
5454
ami_secret_key: ((aws_publish_(@= prefix @)_secret_key))
55-
ami_region: ((aws_publish_(@= region @)_region))
55+
ami_region: ((aws_publish_(@= prefix @)_region))
5656
ami_older_than_days: 60
5757
ami_keep_latest: 5
5858
os_name: (@= data.values.stemcell_details.os_name @)
5959
#@ end
6060

6161
#@yaml/text-templated-strings
6262
---
63-
#@ def cleanup_old_published_light_stemcells(prefix, region):
63+
#@ def cleanup_old_published_light_stemcells(prefix):
6464
task: cleanup-amis-in-(@= prefix @)
6565
file: bosh-stemcells-ci/ci/tasks/light-aws/cleanup-ami.yml
6666
image: bosh-integration-registry-image
6767
params:
6868
AWS_PAGER:
6969
ami_access_key: ((aws_publish_(@= prefix @)_access_key))
7070
ami_secret_key: ((aws_publish_(@= prefix @)_secret_key))
71-
ami_region: ((aws_publish_(@= region @)_region))
71+
ami_region: ((aws_publish_(@= prefix @)_region))
7272
ami_older_than_days: 1095
7373
remove_public_images: true
7474
#@ end
@@ -104,18 +104,18 @@ jobs:
104104
trigger: true
105105
- get: bosh-stemcells-ci
106106
- get: bosh-integration-registry-image
107-
- #@ cleanup_old_published_light_stemcells("us", "us")
108-
- #@ cleanup_old_published_light_stemcells("us-gov", "us-gov")
107+
- #@ cleanup_old_published_light_stemcells("us")
108+
- #@ cleanup_old_published_light_stemcells("us-gov")
109109
- name: cleanup-unpublished-(@= data.values.stemcell_details.os_name @)-aws-light-stemcells
110110
serial: true
111111
plan:
112112
- get: every-week-on-monday
113113
trigger: true
114114
- get: bosh-stemcells-ci
115115
- get: bosh-integration-registry-image
116-
- #@ cleanup_unpublished_light_stemcells("us", "us")
117-
- #@ cleanup_unpublished_light_stemcells("us-gov", "us-gov")
118-
#!- #@ cleanup_unpublished_light_stemcells("cn", "cn_north")
116+
- #@ cleanup_unpublished_light_stemcells("us")
117+
- #@ cleanup_unpublished_light_stemcells("us-gov")
118+
#!- #@ cleanup_unpublished_light_stemcells("cn")
119119

120120
- name: build-light-aws-(@= data.values.stemcell_details.os_name @)-(@= str(data.values.stemcell_details.major_version) @)
121121
plan:

0 commit comments

Comments
 (0)