3838 "path" : "roles/azimuth_identity_operator/defaults/main.yml" ,
3939 "version_key" : "azimuth_identity_operator_chart_version" ,
4040 },
41+ {
42+ "name" : "azimuth-schedule-operator" ,
43+ "path" : "roles/azimuth_schedule_operator/defaults/main.yml" ,
44+ "version_key" : "azimuth_schedule_operator_chart_version" ,
45+ },
4146 {
4247 "name" : "zenith" ,
4348 "path" : "roles/zenith/defaults/main.yml" ,
6166 {
6267 "name" : "caas-workstation" ,
6368 "path" : "roles/azimuth_caas_operator/defaults/main.yml" ,
64- "version_key" : "azimuth_caas_stackhpc_workstation_git_version" ,
69+ "version_key" : [
70+ "azimuth_caas_workstation_default_git_version" ,
71+ "azimuth_caas_stackhpc_workstation_git_version" ,
72+ ],
6573 },
6674 {
6775 "name" : "caas-repo2docker" ,
6876 "path" : "roles/azimuth_caas_operator/defaults/main.yml" ,
69- "version_key" : "azimuth_caas_stackhpc_repo2docker_git_version" ,
77+ "version_key" : [
78+ "azimuth_caas_repo2docker_default_git_version" ,
79+ "azimuth_caas_stackhpc_repo2docker_git_version" ,
80+ ],
7081 },
7182 {
7283 "name" : "caas-r-studio-server" ,
7384 "path" : "roles/azimuth_caas_operator/defaults/main.yml" ,
74- "version_key" : "azimuth_caas_stackhpc_rstudio_git_version" ,
85+ "version_key" : [
86+ "azimuth_caas_rstudio_default_git_version" ,
87+ "azimuth_caas_stackhpc_rstudio_git_version" ,
88+ ],
7589 },
7690 {
7791 "name" : "ansible-slurm-appliance" ,
92+ "org" : "stackhpc" ,
7893 "path" : "roles/azimuth_caas_operator/defaults/main.yml" ,
7994 "version_key" : "azimuth_caas_stackhpc_slurm_appliance_git_version" ,
8095 },
@@ -174,24 +189,31 @@ def fetch_component_version_for_ops_tag(session, tag, component):
174189 Returns the version of the specified component that is used in the specified azimuth-ops tag.
175190 """
176191 response = session .get (
177- f"{ API_URL } /repos/stackhpc /ansible-collection-azimuth-ops/contents/{ component ['path' ]} " ,
192+ f"{ API_URL } /repos/azimuth-cloud /ansible-collection-azimuth-ops/contents/{ component ['path' ]} " ,
178193 params = { "ref" : tag },
179194 headers = { "Content-Type" : "application/vnd.github.raw+json" }
180195 )
181196 response .raise_for_status ()
182197 content = base64 .b64decode (response .json ()["content" ])
183- return yaml .safe_load (content )[component ["version_key" ]]
198+ data = yaml .safe_load (content )
199+ # In order to allow version keys to change between azimuth-ops versions, we support
200+ # specifying a list of keys which we try in order
201+ if isinstance (component ["version_key" ], list ):
202+ version_keys = component ["version_key" ]
203+ else :
204+ version_keys = [component ["version_key" ]]
205+ return next (data [key ] for key in version_keys if key in data )
184206
185207
186- def release_notes_for_component (session , name , from_version , to_version ):
208+ def release_notes_for_component (session , name , org , from_version , to_version ):
187209 """
188210 Produces the release notes for a component between the specified versions.
189211 """
190212 print (f"[INFO] collecting release notes for { name } " )
191213 release_notes = []
192214 for release in fetch_releases (
193215 session ,
194- f"stackhpc /{ name } " ,
216+ f"{ org } /{ name } " ,
195217 min = from_version ,
196218 inclusive_min = False ,
197219 max = to_version ,
@@ -228,11 +250,14 @@ def main():
228250 parser .add_argument (
229251 "--repo" ,
230252 help = "The config repository to target." ,
231- default = "stackhpc /azimuth-config"
253+ default = "azimuth-cloud /azimuth-config"
232254 )
233255 parser .add_argument ("tag" , help = "The tag to generate release notes for." )
234256 args = parser .parse_args ()
235257
258+ # Make sure that the YAML SafeLoader respects Ansible's !unsafe tag
259+ yaml .SafeLoader .add_constructor ("!unsafe" , yaml .SafeLoader .construct_scalar )
260+
236261 session = github_session (args .token )
237262
238263 print (f"[INFO] fetching release for tag - { args .tag } " )
@@ -267,6 +292,7 @@ def main():
267292 release_notes_for_component (
268293 session ,
269294 "ansible-collection-azimuth-ops" ,
295+ "azimuth-cloud" ,
270296 previous_ops_tag ,
271297 current_ops_tag
272298 )
@@ -290,6 +316,7 @@ def main():
290316 release_notes_for_component (
291317 session ,
292318 component ['name' ],
319+ component .get ('org' , 'azimuth-cloud' ),
293320 component_vn_previous ,
294321 component_vn_current
295322 )
0 commit comments