#1536 Enable koji-flatpak plugin for staging
Merged a year ago by kevin. Opened a year ago by otaylor.
fedora-infra/ otaylor/ansible koji-flatpak-on-staging  into  main

@@ -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"

@@ -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:

@@ -0,0 +1,2 @@ 

+ [push]

+ registry={{candidate_registry}}

@@ -121,5 +121,9 @@ 

  

  {{ 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(" ") }}

@@ -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

  #

@@ -88,7 +88,7 @@ 

  #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 %}

This PR attempts to enable the koji-flatpak plugin for building Flatpaks directly on Koji, just for staging for now. See fedora-infrastructure#11465

caveats: 1) entirely untested. 2) I have limited ansible skills.

  • 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 otaylor@fishsoup.net

Missing close " on line 10?

And the plugin needs also to be enabled in roles/koji_builder/templates/kojid.conf

Does koji-flatpak-builder package pull in skopeo? Or should that be added directly?

Otherwise looks pretty reasonable...

rebased onto 5b9f39a02ac7fcef1c744abdc385ddd0b476d194

a year ago

Missing close " on line 10?

Thanks, fixed!

And the plugin needs also to be enabled in roles/koji_builder/templates/kojid.conf

Doh, yes, new version actually enables build and hub plugins (having forgotten that, I thinking "it's weird that just installing the plugin enables things... how is that OK" when writing this patch.)

Does koji-flatpak-builder package pull in skopeo? Or should that be added directly?

koji-flatpak-builder requires skopeo, yes.

rebased onto f3c44a3

a year ago

rebased onto f3c44a3

a year ago

ok. It looks reasonable to me, lets give it a try.

Pull-Request has been merged by kevin

a year ago