From f3c44a3ca3c778ed31eb6f121286b890040f6ec2 Mon Sep 17 00:00:00 2001 From: Owen W. Taylor Date: Aug 14 2023 19:27:31 +0000 Subject: Enable koji-flatpak plugin for staging Just for staging for now: - enable 'podman-login' role for the buildvm group, so built Flatpaks can be pushed to the skopeo registry. - add the koji-flatpak hub plugin to koji_hub role - add the koji-flatpak builder plugin to the koji_builder role and configure it. Signed-off-by: Owen W. Taylor --- diff --git a/playbooks/groups/buildvm.yml b/playbooks/groups/buildvm.yml index 487cf42..397d842 100644 --- a/playbooks/groups/buildvm.yml +++ b/playbooks/groups/buildvm.yml @@ -88,6 +88,12 @@ when: env == "staging" - role: btrfs btrfs_balance_period: weekly + # push built Flatpaks to candidate registry + - role: login-registry + candidate_registry: "candidate-registry.stg.fedoraproject.org" + candidate_registry_osbs_username: "{{candidate_registry_osbs_stg_username}}" + candidate_registry_osbs_password: "{{candidate_registry_osbs_stg_password}}" + when: env == "staging" tasks: - import_tasks: "{{ tasks_path }}/motd.yml" diff --git a/roles/koji_builder/tasks/main.yml b/roles/koji_builder/tasks/main.yml index 9800f62..2271c29 100644 --- a/roles/koji_builder/tasks/main.yml +++ b/roles/koji_builder/tasks/main.yml @@ -124,6 +124,21 @@ - koji_builder - rpmautospec +- name: install Flatpak builder plugin + package: name=koji-flatpak-builder state=present + tags: + - koji_builder + when: env == "staging" + +- name: configure flatpak-builder plugin + template: src=flatpak.conf dest=/etc/kojid/plugins/flatpak.conf + vars: + candidate_registry: "candidate-registry.stg.fedoraproject.org" + notify: + - restart kojid + tags: + - koji_builder + - name: Install arm UEFI firmware package (aarch64 only) package: name=edk2-arm state=present tags: diff --git a/roles/koji_builder/templates/flatpak.conf b/roles/koji_builder/templates/flatpak.conf new file mode 100644 index 0000000..32d1623 --- /dev/null +++ b/roles/koji_builder/templates/flatpak.conf @@ -0,0 +1,2 @@ +[push] +registry={{candidate_registry}} diff --git a/roles/koji_builder/templates/kojid.conf b/roles/koji_builder/templates/kojid.conf index 4490c41..6f1a342 100644 --- a/roles/koji_builder/templates/kojid.conf +++ b/roles/koji_builder/templates/kojid.conf @@ -121,5 +121,9 @@ keytab = /etc/kojid/kojid.keytab {{ plugins.append("scmpolicy") }} +{% if env == 'staging' %} +{{ plugins.append("flatpak") }} +{% endif %} + ; Config for the runroot plugin lives in /etc/kojid/runroot.conf, if enabled plugins = {{ plugins | join(" ") }} diff --git a/roles/koji_hub/tasks/main.yml b/roles/koji_hub/tasks/main.yml index b8d1983..61be30f 100644 --- a/roles/koji_hub/tasks/main.yml +++ b/roles/koji_hub/tasks/main.yml @@ -206,6 +206,12 @@ - koji_hub - rpmautospec +- name: install Flatpak hub plugin + package: name=koji-flatpak-hub state=present + tags: + - koji_hub + when: env == "staging" + # # install keytabs # diff --git a/roles/koji_hub/templates/hub.conf.j2 b/roles/koji_hub/templates/hub.conf.j2 index 8cb8c08..50d9126 100644 --- a/roles/koji_hub/templates/hub.conf.j2 +++ b/roles/koji_hub/templates/hub.conf.j2 @@ -88,7 +88,7 @@ MissingPolicyOk = False #Plugins = koji-disable-builds-plugin #Plugins = darkserver-plugin {% if env == "staging" %} -Plugins = osbuild koji-fedoramessaging runroot_hub hub_containerbuild tag2distrepo sidetag_hub save_failed_tree +Plugins = osbuild koji-fedoramessaging runroot_hub hub_containerbuild tag2distrepo sidetag_hub save_failed_tree flatpak {% else %} Plugins = osbuild koji-fedoramessaging runroot_hub hub_containerbuild tag2distrepo sidetag_hub save_failed_tree {% endif %}