Add script to generate versions.adoc#1008
Conversation
diconico07
left a comment
There was a problem hiding this comment.
Mostly usability comments. This will be a really nice addition 👍
asciidoc/edge-book/versions.adoc.j2
Outdated
| :version-elemental-operator-chart: {{ release_manifest_elemental_version }} | ||
| :version-elemental-operator-crds-chart: {{ release_manifest_elemental_crd_version }} | ||
| :version-endpoint-copier-operator-chart: {{ release_manifest_eco_version }} | ||
| :version-fleet-chart: 108.0.1+up0.14.1 |
There was a problem hiding this comment.
I'd group all the "manually handled ones" to make them more visible
|
Converting to draft until I have time to rewrite the script |
First pass of updates for 3.5.0 - note the versions are derived from suse-edge#1008 but I will follow up with the script changes in another PR The release notes will require further work but this is hopefully a reasonable first pass we can iterate on
First pass of updates for 3.5.0 - note the versions are derived from #1008 but I will follow up with the script changes in another PR The release notes will require further work but this is hopefully a reasonable first pass we can iterate on
Several files are commented in the edge.adoc, so lets remove them to clean up and simplify the versions.adoc
|
@diconico07 ready for another review when you get time - note this depends on #1088 |
Adds a script/template which allows us to generate the versions derived from the release manifest, hopefully this will be less effort and less error-prone than manual updates
| :version-longhorn: 1.10.2 | ||
| :version-neuvector: 5.4.8 | ||
| :version-kubevirt: 1.5.2 | ||
| :version-kubevirt: 0.6.0 |
There was a problem hiding this comment.
I think this attribute is unused so can be removed, but the version-kubevirt-release above is wrong, we need to reference the upstream version which isn't actually the +up in this case
| kiwi_builder_repo = f"{registry_base}/kiwi-builder" | ||
| kiwi_builder_version = get_latest_version_tag(kiwi_builder_repo) | ||
| # Strip suffix after hyphen (e.g., 10.2.29.1-1.1 -> 10.2.29.1) | ||
| manifest_data['version_kiwi_builder'] = kiwi_builder_version.split('-')[0] | ||
|
|
||
| eib_repo = f"{registry_base}/edge-image-builder" | ||
| eib_version = get_latest_version_tag(eib_repo) | ||
| # Strip suffix after hyphen (e.g., 1.3.3-4.4 -> 1.3.3) | ||
| manifest_data['version_eib'] = eib_version.split('-')[0] |
There was a problem hiding this comment.
Those two are now in the tooling manifest
| # Get upgrade-controller chart version | ||
| # Extract major.minor from release version (e.g., 3.5.0 -> 3.5) | ||
| release_version = manifest_data.get('spec', {}).get('releaseVersion', '') | ||
| if release_version: | ||
| version_parts = release_version.split('.')[:2] # Get major.minor | ||
| chart_prefix = version_parts[0] + '0' + version_parts[1] # e.g., 3.5 -> 305 | ||
| # Charts are at registry.suse.com/edge/charts/upgrade-controller (not version-specific) | ||
| registry_name = repository.split('/')[0] | ||
| upgrade_controller_repo = f"{registry_name}/edge/charts/upgrade-controller" | ||
| upgrade_controller_version = get_latest_version_tag_with_prefix(upgrade_controller_repo, chart_prefix) | ||
| # Strip suffix after hyphen (e.g., 305.0.3_up0.1.3-4.1 -> 305.0.3_up0.1.3) | ||
| manifest_data['version_upgrade_controller_chart'] = upgrade_controller_version.split('-')[0] |
There was a problem hiding this comment.
Upgrade controller is now in release manifest
| # Render template with manifest data | ||
| output = template.render(manifest_data) | ||
|
|
||
| # Replace %%REVDATE%% with current date |
There was a problem hiding this comment.
Why not add current date to the variables available to the template ?
| {%- set release_manifest_akri_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "akri") | map(attribute="version") | list | first %} | ||
| {%- set release_manifest_akri_dashboard_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "akri") | map(attribute="addonCharts") | first | map(attribute="version") | list | first %} |
Adds a script/template which allows us to generate the versions derived from the release manifest, hopefully this will be less effort and less error-prone than manual updates
Note this is a first step which requires running the script manually - in future we can add a check job to enforce its use, and potentially look at ways to automate the updates via a renovate type flow.