#5511 [WIP] generic webhook like pagure ci plugin, reference implementation together with AWS CodePipeline
Closed by ryanlerch. Opened by wombelix.
wombelix/pagure feat_pagure_ci_generic_webhook_plugin  into  master

Download 5511.patch

It started with the idea of a pagure ci plugin for AWS CodePipeline but then I realized a more generic approach might be better.
AWS CodePipeline and / or AWS CodeBuild require a bit of custom implementation within the individual AWS Account, for example with AWS Lambda.
So I have to send some json payload via HTTPs to trigger that and can't move all AWS related logic into pagure.
There will be an AWS based reference implementation, but the plugin can be leverage by other implementations as well.

The related SUSE Hack Week project, the majority of work was done as part of it: https://hackweek.opensuse.org/projects/aws-codepipeline-ci-plugin-for-pagure-on-code-dot-opensuse-dot-org

I wrote some stuff down in my SUSE Hack Week recaps:

  • https://dominik.wombacher.cc/posts/suse-hack-week-2025-day-1.html
  • https://dominik.wombacher.cc/posts/suse-hack-week-2025-day-2.html
  • https://dominik.wombacher.cc/posts/suse-hack-week-2025-day-3.html
  • https://dominik.wombacher.cc/posts/suse-hack-week-2025-day-4.html
  • https://dominik.wombacher.cc/posts/suse-hack-week-2025-day-5.html (Will be online later tonight...)

The plugin is still work in progress, not ready to merge yet, current status:

Completed:

  • Outgoing webhook json generation
  • Incoming generic_ci_notification
  • Trigger build (mandatory value validation)

Pending:

  • Sending the webhook as part of Trigger build
  • SIGv4, Basic and Token authentication for outgoing requests

Full test coverage because of TDD approach. I forced myself this time to not write a single line actual code without writing the test first.

I tried to keep the changes to functionality that's shared with the jenkins plugin.
But right now that's broken and I'm aware of the following four failing jenkins related tests that I have to fix:

FAILED tests/test_pagure_lib_task_services.py::PagureLibTaskServicesJenkinsCItests::test_trigger_ci_build_valid_project - AssertionError: expected call not found.
FAILED tests/test_pagure_lib_task_services.py::PagureLibTaskServicesJenkinsCIAuthtests::test_trigger_ci_build_valid_project - AssertionError: expected call not found.
FAILED tests/test_pagure_lib_task_services.py::PagureLibTaskServicesJenkinsCIAuthtests::test_trigger_ci_build_valid_project_fork - AssertionError: expected call not found.
FAILED tests/test_pagure_lib_task_services.py::PagureLibTaskServicesJenkinsCItests::test_trigger_ci_build_valid_project_fork - AssertionError: expected call not found.

This project has moved to https://forge.fedoraproject.org/apps/pagure. As part of the migration, all open pull requests on pagure.io have been closed. If you'd like to continue working on this, please fork the repository on the new forge and re-submit your PR there.

Pull-Request has been closed by ryanlerch

Metadata