[BUILD-1049] Allow triggering of git repository mirroring via webhooks Created: 13/Apr/23 Updated: 15/May/23 |
|
| Status: | Selected |
| Project: | Build |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Neutral |
| Reporter: | Federico Grilli | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Task DoR: |
Empty
|
||||||||||||||||
| Work Started: | |||||||||||||||||
| Description |
|
A follow-up ticket to The initial implementation of the git repo mirroring task uses a simple cron job to trigger the relevant command in the magnolia-mgmt app. However, it would be preferable to trigger the command via webhooks. For instance, Bitbucket offers the ability to trigger a web hook upon certain events (e.g. a push to a given repo). Some technical issues that need addressing:
Ideally the solution should comply with BUILD-1048 so we can reuse the same endpoint. But, if Bitbucket is not able to send the request as required by the convention stated in BUILD-1048, me might need to define a new enpoint for this specific case (or change the convention to address the different cases, if possible). DiscoveryAccording to Bitbucket server webhook documentation, the relevant points for this task are:
Therefore, looks like a new magnolia-mgmt API endpoint is needed to receive webhook requests (mainly because authentication restrictions). The're already two enpoints.
We might as well implement a third one accepting webhook authenticated requests, but reusing the same magnolia-mgmt-controller.js parsing the request in an standard way as required by BUILD-1048. Relevant resources:
|