#1988 Have Bodhi composes include atomic desktop containers on f40+
Merged 3 months ago by kevin. Opened 3 months ago by adamwill.
fedora-infra/ adamwill/ansible bodhi-compose-ostree-container  into  main

@@ -272,6 +272,90 @@ 

          [% endif %]

      ]

  }

+ [% if release.version_int >= 40 %]

+ ostree_container = {

+     "^Silverblue$": {

+         "version": "!VERSION_FROM_VERSION_DATE_RESPIN",

+         "config_url": "https://pagure.io/workstation-ostree-config.git",

+         "config_branch": "f[[ release.version ]]",

+         "repo": [

+                 [% if request.name == 'testing' %]

+                     # In the case of testing, also inject the last stable updates

+                     "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/updates/f[[ release.version_int ]]-updates/compose/Everything/$basearch/os/",

+                 [% endif %]

+                 # For F41 the compose location is going to be under /compose/branched/

+                 [% if release.version_int == 41 %]

+                     "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/branched/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/"

+                 [% else %]

+                     "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/[[ release.version_int ]]/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/"

+                 [% endif %]

+         ],

+         "treefile": "fedora-silverblue.yaml",

+         "arches": ["x86_64", "ppc64le", "aarch64"],

+         "failable": ['*'],

+     },

+     "^Kinoite$": {

+         "version": "!VERSION_FROM_VERSION_DATE_RESPIN",

+         "config_url": "https://pagure.io/workstation-ostree-config.git",

+         "config_branch": "f[[ release.version ]]",

+         "repo": [

+                 [% if request.name == 'testing' %]

+                     # In the case of testing, also inject the last stable updates

+                     "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/updates/f[[ release.version_int ]]-updates/compose/Everything/$basearch/os/",

+                 [% endif %]

+                 # For F41 the compose location is going to be under /compose/branched/

+                 [% if release.version_int == 41 %]

+                     "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/branched/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/"

+                 [% else %]

+                     "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/[[ release.version_int ]]/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/"

+                 [% endif %]

+         ],

+         "treefile": "fedora-kinoite.yaml",

+         "arches": ["x86_64", "ppc64le", "aarch64"],

+         "failable": ['*'],

+     },

+     "^Sericea$": {

+         "version": "!VERSION_FROM_VERSION_DATE_RESPIN",

+         "config_url": "https://pagure.io/workstation-ostree-config.git",

+         "config_branch": "f[[ release.version ]]",

+         "repo": [

+                 [% if request.name == 'testing' %]

+                     # In the case of testing, also inject the last stable updates

+                     "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/updates/f[[ release.version_int ]]-updates/compose/Everything/$basearch/os/",

+                 [% endif %]

+                 # For F41 the compose location is going to be under /compose/branched/

+                 [% if release.version_int == 41 %]

+                     "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/branched/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/"

+                 [% else %]

+                     "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/[[ release.version_int ]]/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/"

+                 [% endif %]

+         ],

+         "treefile": "fedora-sericea.yaml",

+         "arches": ["x86_64", "aarch64"],

+         "failable": ['*'],

+     },

+     "^Onyx$": {

+         "version": "!VERSION_FROM_VERSION_DATE_RESPIN",

+         "config_url": "https://pagure.io/workstation-ostree-config.git",

+         "config_branch": "f[[ release.version ]]",

+         "repo": [

+                 [% if request.name == 'testing' %]

+                     # In the case of testing, also inject the last stable updates

+                     "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/updates/f[[ release.version_int ]]-updates/compose/Everything/$basearch/os/",

+                 [% endif %]

+                 # For F41 the compose location is going to be under /compose/branched/

+                 [% if release.version_int == 41 %]

+                     "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/branched/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/"

+                 [% else %]

+                     "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/[[ release.version_int ]]/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/"

+                 [% endif %]

+         ],

+         "treefile": "fedora-onyx.yaml",

+         "arches": ["x86_64"],

+         "failable": ['*'],

+     },

+ }

+ [% endif %]

  [% endif %]

  

  {% endif %}

Since Fedora 40, we've built native OCI containers for the atomic
desktops in the pre-release nightly and release composes. We
should also build native containers in the post-release nightly
composes that Bodhi runs. This should allow us to get rid of the
on-the-fly OCI image generation in the sync-ostree-base-containers
script.

Signed-off-by: Adam Williamson awilliam@redhat.com

couple of notes here:

  • In case anyone's wondering "how do these conditionalizations work anyway?", this isn't just a template, it's a template-template. The template-y bits in curly braces - {{, {% etc - are parsed by ansible when deploying the file to the Bodhi server. The ones in square braces - [[, [% etc. - are left in, and Bodhi uses these to generate final Pungi config files on the fly when running composes, by constructing a Jinja parser instance with custom strings.
  • The dicts in the existing ostree phase seem to be missing commas, to me. In every case, there is no comma at the end of the "repo" item. I have no idea how this doesn't break things; it doesn't seem to, somehow, but I still decided to add the missing commas in this new section (otherwise, the "repo" items are just copied-and-pasted in from the ostree dicts, they are all the same).

As discussed at https://pagure.io/releng/issue/12081#comment-907473 and below, worth noting that ostree_container builds take a long time with rpm-ostree versions before 2024.5, but that version is already stable for F40 and Rawhide, and I made this PR only do the ostree_container builds on F40+.

Sure, lets give it a try...

Pull-Request has been merged by kevin

3 months ago

Unless I missed something, we should have a run of those in https://kojipkgs.fedoraproject.org/compose/updates/Fedora-40-updates-20240430.0/work/ today but I don't see that.

Maybe it's because for the classic ostree ones they are located under "Everything" where those are under their own variant names.

Thanks for https://pagure.io/fedora-infra/ansible/pull-request/1988#comment-202377, that explains things as I've always wondered where the templating was coming from.

No problem. If you're curious, the code's here.

Metadata