Pagure as a source-git platform
It seems that the Fedora community wants to pursue pagure.io as the git forge platform. Let's have a look at what it would take to use it to host Fedora source-git repos in there.
Requirements/functionality
From Franta's research:
(sg == source-git, dg == dist-git)
Must:
- New sg PR is transformed into a new dg PR
- New PR event - fedora-messaging: pull-request.new
- Create new PR - “Create pull-request” in API
- dg PR CI results are mirrored back to sg PR
- Get CI results - fedora-messaging: pr.flag.added / pr.flag.updated
- Set CI results - “Flag a pull-request” in API
- If the dg is updated, update the sg repository by opening a PR
- Dg updated - fedora-messaging: git.receive
- Open new PR - “Create pull-request” in API
Should:
- If the sg PR is updated/closed, update/close the dg PR
- PR updated/closed - fedora-messaging: pr.updated / pr.rebased / pr.closed
- Update PR - git force-push to existing branch
- Close PR - “Close a pull-request” in API
Could:
- User is able to re-trigger the dg CI from the sg PR
- If the user comments
/citest
on the sg PR, retrigger dg CI by adding a[citest]
comment via API.
- If the user comments
- User is able to re-create the dg PR from the sg PR
- If the user comments
/update-dist-git
in the sg PR, update and force-push the content of the dg PR.
- If the user comments
Notes
There are 2 ways of getting notifications about events (PR opened/updated etc.) from pagure:
- Webhooks - to verify messages, receiver (our service) needs to know a private webhook key, which is set in repositories and is unique for each repo
- Fedora-messaging - no verification mechanism, but we “know” the
pagure.*
topic is from pagure
Pagure has CI integration but seems to support Jenkins only.
In Project Settings
-> Hooks
one can set Mirroring to mirror a repo hosted on pagure to another location.