[poddlers] Enable new toddler in poddlers

PagureFASGroupsSync is for syncing FAS groups with pagure groups, where FAS is
the source of truth.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit is contained in:
Michal Konecny 2024-07-24 14:03:44 +02:00
parent 1b0fc1c5cb
commit 2142d1c739
3 changed files with 31 additions and 2 deletions

View file

@ -75,6 +75,8 @@
- role: openshift/object
app: poddlers
service: poddlers
host: "koji{{env_suffix}}.fedoraproject.org"
template: secrets.yml
objectname: secrets.yml

View file

@ -213,8 +213,8 @@ profile = "stg"
{% else %}
profile = "koji"
{% endif %}
principal = {{service}}/{{host}}
keytab = /etc/keytabs/service.keytab
principal = "{{service}}/{{host}}"
keytab = "/etc/keytabs/service.keytab"
# Configuration section for scm_request_processor
[consumer_config.scm_request_processor]
@ -322,6 +322,24 @@ mail_content_tmpl = """Notification time stamped {headers[sent-at]}
{commit[url]}
"""
[consumer_config.pagure_fas_groups_sync]
{% if env == "staging" %}
pagure_url = "https://stg.pagure.io"
# Token needs to have following permissions:
# - adding_member_to_group
# - removing_member_from_group
pagure_api_key = "{{ toddlers_stg_pagure_fas_groups_sync_token }}"
{% else %}
pagure_url = "https://pagure.io"
# Token needs to have following permissions:
# - adding_member_to_group
# - removing_member_from_group
pagure_api_key = "{{ toddlers_pagure_fas_groups_sync_token }}"
{% endif %}
[consumer_config.pagure_fas_groups_sync.group_map]
#Mapping of FAS groups to Pagure groups
infra-sig = 'fedora-infra'
[qos]
prefetch_size = 0

View file

@ -75,6 +75,12 @@ poddlers_toddlers:
- "org.fedoraproject.*.pagure.issue.edit"
- "org.fedoraproject.*.pagure.issue.comment.added"
- name: pagure-fas-groups-sync
callback: pagure_fas_groups_sync:PagureFASGroupsSync
topics:
- "org.fedoraproject.*.fas.group.member.sponsor"
- "org.fedoraproject.*.toddlers.trigger.pagure_fas_groups_sync"
poddlers_cronjobs:
- name: packager-bugzilla-sync
schedule: "0 */6 * * *"
@ -100,3 +106,6 @@ poddlers_cronjobs:
schedule: "0 8 */2 * *"
only_env: staging
command: check-commit-rights
- name: pagure-fas-groups-sync
schedule: "0 4 * * *"
command: pagure_fas_groups_sync