|
44 | 44 |
|
45 | 45 | #@yaml/text-templated-strings |
46 | 46 | --- |
47 | | -#@ def cleanup_unpublished_light_stemcells(prefix, region): |
| 47 | +#@ def cleanup_unpublished_light_stemcells(prefix): |
48 | 48 | task: cleanup-amis-in-(@= prefix @) |
49 | 49 | file: bosh-stemcells-ci/ci/tasks/light-aws/cleanup-ami.yml |
50 | 50 | image: bosh-integration-registry-image |
51 | 51 | params: |
52 | 52 | AWS_PAGER: |
53 | 53 | ami_access_key: ((aws_publish_(@= prefix @)_access_key)) |
54 | 54 | ami_secret_key: ((aws_publish_(@= prefix @)_secret_key)) |
55 | | - ami_region: ((aws_publish_(@= region @)_region)) |
| 55 | + ami_region: ((aws_publish_(@= prefix @)_region)) |
56 | 56 | ami_older_than_days: 60 |
57 | 57 | ami_keep_latest: 5 |
58 | 58 | os_name: (@= data.values.stemcell_details.os_name @) |
59 | 59 | #@ end |
60 | 60 |
|
61 | 61 | #@yaml/text-templated-strings |
62 | 62 | --- |
63 | | -#@ def cleanup_old_published_light_stemcells(prefix, region): |
| 63 | +#@ def cleanup_old_published_light_stemcells(prefix): |
64 | 64 | task: cleanup-amis-in-(@= prefix @) |
65 | 65 | file: bosh-stemcells-ci/ci/tasks/light-aws/cleanup-ami.yml |
66 | 66 | image: bosh-integration-registry-image |
67 | 67 | params: |
68 | 68 | AWS_PAGER: |
69 | 69 | ami_access_key: ((aws_publish_(@= prefix @)_access_key)) |
70 | 70 | ami_secret_key: ((aws_publish_(@= prefix @)_secret_key)) |
71 | | - ami_region: ((aws_publish_(@= region @)_region)) |
| 71 | + ami_region: ((aws_publish_(@= prefix @)_region)) |
72 | 72 | ami_older_than_days: 1095 |
73 | 73 | remove_public_images: true |
74 | 74 | #@ end |
@@ -104,18 +104,18 @@ jobs: |
104 | 104 | trigger: true |
105 | 105 | - get: bosh-stemcells-ci |
106 | 106 | - 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") |
109 | 109 | - name: cleanup-unpublished-(@= data.values.stemcell_details.os_name @)-aws-light-stemcells |
110 | 110 | serial: true |
111 | 111 | plan: |
112 | 112 | - get: every-week-on-monday |
113 | 113 | trigger: true |
114 | 114 | - get: bosh-stemcells-ci |
115 | 115 | - 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") |
119 | 119 |
|
120 | 120 | - name: build-light-aws-(@= data.values.stemcell_details.os_name @)-(@= str(data.values.stemcell_details.major_version) @) |
121 | 121 | plan: |
|
0 commit comments