-
Notifications
You must be signed in to change notification settings - Fork 43
[WIP] Add script to generate versions.adoc and update for 3.5 #1008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,154 @@ | ||
| // NOTE - Generated by versions.adoc.j2, do not modify versions.adoc directly! | ||
| {% set release_manifest_edge_version = spec.releaseVersion %} | ||
| {%- set release_manifest_edge_version_short = spec.releaseVersion.split(".")[:2] | join(".") %} | ||
| {%- set release_manifest_rke2_version = spec.components.kubernetes.rke2.version %} | ||
| {%- set release_manifest_k3s_version = spec.components.kubernetes.k3s.version %} | ||
| {%- set release_manifest_slmicro_version = spec.components.operatingSystem.version %} | ||
| {%- set release_manifest_rancher_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "rancher") | map(attribute="version") | list | first %} | ||
| {%- set release_manifest_longhorn_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "longhorn") | map(attribute="version") | list | first %} | ||
| {%- set release_manifest_longhorn_crd_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "longhorn") | map(attribute="dependencyCharts") | first | map(attribute="version") | list | first %} | ||
| {%- set release_manifest_neuvector_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "neuvector") | map(attribute="version") | list | first %} | ||
| {%- set release_manifest_neuvector_crd_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "neuvector") | map(attribute="dependencyCharts") | first | map(attribute="version") | list | first %} | ||
| {%- set release_manifest_neuvector_dashboard_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "neuvector") | map(attribute="addonCharts") | first | map(attribute="version") | list | first | replace("%%CHART_MAJOR%%", release_manifest_chart_major) %} | ||
| {%- set release_manifest_chart_major = release_manifest_edge_version_short | replace(".", "0") %} | ||
| {%- set release_manifest_metallb_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "metallb") | map(attribute="version") | list | first | replace("%%CHART_MAJOR%%", release_manifest_chart_major) %} | ||
| {%- set release_manifest_eco_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "endpoint-copier-operator") | map(attribute="version") | list | first | replace("%%CHART_MAJOR%%", release_manifest_chart_major) %} | ||
| {%- set release_manifest_cdi_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "cdi") | map(attribute="version") | list | first | replace("%%CHART_MAJOR%%", release_manifest_chart_major) %} | ||
| {%- set release_manifest_akri_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "akri") | map(attribute="version") | list | first | replace("%%CHART_MAJOR%%", release_manifest_chart_major) %} | ||
| {%- set release_manifest_akri_dashboard_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "akri") | map(attribute="addonCharts") | first | map(attribute="version") | list | first | replace("%%CHART_MAJOR%%", release_manifest_chart_major) %} | ||
| {%- set release_manifest_metal3_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "metal3") | map(attribute="version") | list | first | replace("%%CHART_MAJOR%%", release_manifest_chart_major) %} | ||
| {%- set release_manifest_kubevirt_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "kubevirt") | map(attribute="version") | list | first | replace("%%CHART_MAJOR%%", release_manifest_chart_major) %} | ||
| {%- set release_manifest_kubevirt_dashboard_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "kubevirt") | map(attribute="addonCharts") | first | map(attribute="version") | list | first | replace("%%CHART_MAJOR%%", release_manifest_chart_major) %} | ||
| {%- set release_manifest_elemental_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "elemental-operator") | map(attribute="version") | list | first %} | ||
| {%- set release_manifest_elemental_crd_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "elemental-operator") | map(attribute="dependencyCharts") | first | map(attribute="version") | list | first %} | ||
| {%- set release_manifest_elemental_dashboard_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "elemental-operator") | map(attribute="addonCharts") | first | map(attribute="version") | list | first | replace("%%CHART_MAJOR%%", release_manifest_chart_major) %} | ||
| {%- set release_manifest_sriov_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "sriov-network-operator") | map(attribute="version") | list | first %} | ||
| {%- set release_manifest_sriov_crd_version = spec.components.workloads.helm | selectattr("releaseName", "equalto", "sriov-network-operator") | map(attribute="dependencyCharts") | first | map(attribute="version") | list | first %} | ||
| // ============================================================================ | ||
| :revdate: %%REVDATE%% | ||
| :page-revdate: {revdate} | ||
| // Automatic Version Substitutions | ||
| // | ||
| // The values in here are used throughout the documentation. Updating them here | ||
| // will propagate throughout the rest of the documentation. See the section at | ||
| // the bottom for details on versioning instances that cannot be handled in this | ||
| // fashion. | ||
| // ============================================================================ | ||
|
|
||
| // == General Edge == | ||
| :version-edge: {{ release_manifest_edge_version_short }} | ||
| :version-edge-registry: {{ release_manifest_edge_version_short }} | ||
|
|
||
| // == Multi-Linux Manager == | ||
| :version-mlm: 5.0.6 | ||
|
|
||
| // == Edge Image Builder == | ||
| :version-eib: 1.3.0 | ||
| :version-eib-api-latest: 1.3 | ||
|
|
||
| // KubeVirt | ||
| // This is used in download URLs and filenames from upstream, so it must have | ||
| // the leading "v". If needed, a separate version-kubevirt should be created | ||
| // with simply the version number itself. | ||
| :version-kubevirt-release: v{{ release_manifest_kubevirt_version .split("+up") | last }} | ||
|
|
||
| // == Component Versions == | ||
| :version-rancher-prime: {{ release_manifest_rancher_version }} | ||
| :version-cert-manager: 1.19.2 | ||
| :version-elemental-operator: {{ release_manifest_elemental_version }} | ||
| :version-longhorn: {{ release_manifest_longhorn_version.split("+up") | last }} | ||
| :version-neuvector: 5.4.8 | ||
| :version-kubevirt: 1.5.2 | ||
| :version-endpoint-copier-operator: {{ release_manifest_eco_version.split("+up") | last }} | ||
| :version-suc: 0.17.0 | ||
| :version-nm-configurator: 0.3.5 | ||
| :version-fleet: 0.14.1 | ||
| :version-cdi: {{ release_manifest_cdi_version.split("+up") | last }} | ||
| :version-nvidia-device-plugin: 0.14.5 | ||
| :version-kiwi-builder: 10.2.12.0 | ||
|
|
||
| // == Nessie == | ||
| :version-nessie: 1.0.0 | ||
|
|
||
| // == Non-Release Manifest Charts == | ||
| :version-suc-chart: 108.0.0 | ||
| :version-upgrade-controller-chart: 305.0.1+up0.1.1 | ||
| :version-nvidia-device-plugin-chart: v0.14.5 | ||
|
|
||
| // == Release Tags == | ||
| :release-tag-eib: release-1.3 | ||
| :release-tag-edge-charts: release-{{ release_manifest_edge_version_short }} | ||
| :release-tag-telco-cloud: release-{{ release_manifest_edge_version_short }} | ||
| :release-tag-fleet-examples: release-{{ release_manifest_edge_version }} | ||
| :release-tag-rancher: v{{ release_manifest_rancher_version }} | ||
|
|
||
|
|
||
| // ============================================================================ | ||
| // Release Manifest Versions | ||
| // | ||
| // The following are derived from the `releaseName` field of the release manifest | ||
| // and should not be renamed without thinking through the implications. | ||
| // ============================================================================ | ||
|
|
||
| :version-kubernetes-k3s: {{ release_manifest_k3s_version }} | ||
| :version-kubernetes-rke2: {{ release_manifest_rke2_version }} | ||
|
|
||
| :version-operatingsystem: {{ release_manifest_slmicro_version }} | ||
|
|
||
| :version-akri-chart: {{ release_manifest_akri_version }} | ||
| :version-akri-dashboard-extension-chart: {{ release_manifest_akri_dashboard_version }} | ||
| :version-cdi-chart: {{ release_manifest_cdi_version }} | ||
| :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 | ||
| :version-kubevirt-chart: {{ release_manifest_kubevirt_version }} | ||
| :version-kubevirt-dashboard-extension-chart: {{ release_manifest_kubevirt_dashboard_version }} | ||
| :version-longhorn-chart: {{ release_manifest_longhorn_version }} | ||
| :version-longhorn-crd-chart: {{ release_manifest_longhorn_crd_version }} | ||
| :version-longhorn-docs: {{ release_manifest_longhorn_version.split("+up") | last }} | ||
| :version-metal3-chart: {{ release_manifest_metal3_version }} | ||
| :version-metallb-chart: {{ release_manifest_metallb_version }} | ||
| :version-neuvector-chart: {{ release_manifest_neuvector_version }} | ||
| :version-neuvector-crd-chart: {{ release_manifest_neuvector_crd_version }} | ||
| :version-neuvector-dashboard-extension-chart: {{ release_manifest_neuvector_dashboard_version }} | ||
| :version-rancher-chart: {{ release_manifest_rancher_version }} | ||
| :version-rancher-turtles-chart: 304.0.6+up0.24.0 | ||
diconico07 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| :version-sriov-crd-chart: {{ release_manifest_sriov_crd_version }} | ||
| :version-sriov-network-operator-chart: {{ release_manifest_sriov_version }} | ||
| :version-sriov-upstream: {{ release_manifest_sriov_version.split("+up") | last }} | ||
|
|
||
| // capi-provider-metal3 | ||
| // edu, Oct 9, 2025 :: Used to link the CRDs on the docs site like | ||
| // https://doc.crds.dev/github.com/metal3-io/cluster-api-provider-metal3/infrastructure.cluster.x-k8s.io/Metal3MachineTemplate/[email protected]#spec-template-spec-hostSelector-matchLabels | ||
| :version-capi-provider-metal3: [email protected] | ||
|
|
||
| // ============================================================================ | ||
| // Derived Version Entries | ||
| // | ||
| // The following are derived from previously defined versions, ensure they | ||
| // are not using elements defined below them | ||
| // | ||
| // ============================================================================ | ||
|
|
||
| // == SUSE Linux Micro == | ||
| :micro-base-image-raw: SL-Micro.x86_64-{version-operatingsystem}-Base-GM.raw | ||
| :micro-base-rt-image-raw: SL-Micro.x86_64-{version-operatingsystem}-Base-RT-GM.raw | ||
| :micro-base-rt-image-iso: SL-Micro.x86_64-{version-operatingsystem}-Base-RT-SelfInstall-GM.install.iso | ||
| :micro-base-image-iso: SL-Micro.x86_64-{version-operatingsystem}-Base-SelfInstall-GM.install.iso | ||
| :micro-default-image-iso: SL-Micro.x86_64-{version-operatingsystem}-Default-SelfInstall-GM.install.iso | ||
|
|
||
|
|
||
| // ============================================================================ | ||
| // Manual Version Entries | ||
| // | ||
| // The following files mention versions that cannot be handled through | ||
| // substitution. For example, EIB definitions that contain a list of | ||
| // images to embed. These files should be manually reviewed on a per-release | ||
| // basis to ensure accuracy. | ||
| // ============================================================================ | ||
|
|
||
| // asciidoc/guides/air-gapped-eib-deployments.adoc | ||
| // asciidoc/product/atip-management-cluster.adoc | ||
| // asciidoc/product/atip-automated-provision.adoc | ||
| // asciidoc/edge-book/releasenotes.adoc | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| _release_manifest.yaml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # SUSE Edge documentation scripts | ||
|
|
||
| These scripts are used to simplify the maintenance of the documentation in this repo | ||
|
|
||
|
|
||
|
|
||
| ## Update release versions | ||
|
|
||
| The `versions_update.sh` script updates the `versions.adoc` using data from the Factory `release_manifest.yaml` | ||
|
|
||
| ```bash | ||
| ./versions_update.sh | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/usr/bin/env bash | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since we are rendering using python and jinja2, would make it easier to have a python script I think.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah fair point, I can re-write it in python which will probably be cleaner |
||
|
|
||
|
|
||
|
|
||
| set -eux | ||
|
|
||
| RELEASE_BRANCH=${RELEASE_BRANCH_:-"main"} | ||
|
|
||
| echo "Downloading release manifest for ${RELEASE_BRANCH} branch" | ||
| curl "https://src.opensuse.org/suse-edge/Factory/raw/branch/${RELEASE_BRANCH}/release-manifest-image/release_manifest.yaml" -o _release_manifest.yaml | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would rather use the rendered version from
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed that will make it simpler |
||
|
|
||
| # Uses https://github.com/mattrobenolt/jinja2-cli - on mac `brew install jinja2-cli` | ||
| VERSIONS_TEMPLATE=${VERSIONS_TEMPLATE:-"../asciidoc/edge-book/versions.adoc.j2"} | ||
| VERSIONS_FILE=${VERSIONS_FILE:-"../asciidoc/edge-book/versions.adoc"} | ||
| # Generating ${VERSIONS_FILE} | ||
| jinja2 ${VERSIONS_TEMPLATE} _release_manifest.yaml | tee ${VERSIONS_FILE} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not fond of the use of |
||
| REVISION_DATE=$(date +%Y-%m-%d) | ||
| sed -i "s/%%REVDATE%%/${REVISION_DATE}/" ${VERSIONS_FILE} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd group all the "manually handled ones" to make them more visible