diff --git a/roles/bodhi2/base/tasks/main.yml b/roles/bodhi2/base/tasks/main.yml index aae558451a..a95770cc31 100644 --- a/roles/bodhi2/base/tasks/main.yml +++ b/roles/bodhi2/base/tasks/main.yml @@ -36,6 +36,17 @@ - config - bodhi +- name: Copy auth file for quay.io + ansible.builtin.template: + src: flatpak-bot-auth.json.j2 + dest: /etc/bodhi/flatpak-bot-auth.json + owner: bodhi + group: root + mode: "0644" + tags: + - config + - bodhi + # Bodhi virtualhost in RabbitMQ - name: Configure the bodhi virtual host diff --git a/roles/bodhi2/base/templates/flatpak-bot-auth.json.j2 b/roles/bodhi2/base/templates/flatpak-bot-auth.json.j2 new file mode 100644 index 0000000000..224fc95f14 --- /dev/null +++ b/roles/bodhi2/base/templates/flatpak-bot-auth.json.j2 @@ -0,0 +1,12 @@ +{ + "auths": { + "quay.io": { +{% if env == 'staging' %} + "auth": {{ bodhi2_quayio_auth_stg }}, +{% else %} + "auth": {{ bodhi2_quayio_auth }}, +{% endif %} + "email": "" + } + } +} diff --git a/roles/bodhi2/base/templates/production.ini.j2 b/roles/bodhi2/base/templates/production.ini.j2 index 82f5155b10..4a5a297b15 100644 --- a/roles/bodhi2/base/templates/production.ini.j2 +++ b/roles/bodhi2/base/templates/production.ini.j2 @@ -204,13 +204,13 @@ pungi.extracmdline = --notification-script=/usr/bin/pungi-fedmsg-notification -- skopeo.cmd = /usr/bin/skopeo # Comma separated list of extra flags to pass to the skopeo copy command. -skopeo.extra_copy_flags = -a,--retry-times=10 +skopeo.extra_copy_flags = -a,--retry-times=10,--authfile=/etc/bodhi/flatpak-bot-auth.json # Container hostnames. You can specify a port as well, using the traditional syntax (i.e., localhost:5000). -# container.destination_registry = registry.fedoraproject.org -# container.source_registry = candidate-registry.fedoraproject.org +container.destination_registry = registry.fedoraproject.org quay.io/fedora-flatpaks +container.source_registry = candidate-registry.fedoraproject.org {% if env == 'staging' %} -container.destination_registry = registry.stg.fedoraproject.org quay.io/fedora-testingflatpak +container.destination_registry = registry.stg.fedoraproject.org quay.io/fedora-flatpaks-testing container.source_registry = candidate-registry.stg.fedoraproject.org {% endif %}