First step to support additional CI types other than Jenkins.
This should make it generic enough that adding a new file to pagure/api/ci/ and adjusting PAGURE_CI_SERVICES enables it.
The tests still use Jenkins, it's the currently available CI type and testing the general Pagure CI functionality with it is fine.
New CI type should then define additional tests, specific to themselves, in tests/test_<ci_type>.py.
Problem
Currently pagure supports only Jenkins out-of-the-box.
A plugin system is in place but there is Jenkins specific code in global libraries.
Solution
Refactor the code to move all Jenkins specific parts into pagure/api/ci/jenkins.py
Goal
Pagure core handles all CI types generic.
Specific code is only located in a single file pagure/api/ci/<ci_type>.py.
They are loaded by adding the name to the config Parameter PAGURE_CI_SERVICES.
First step to support additional CI types other than Jenkins.
This should make it generic enough that adding a new file to
pagure/api/ci/and adjustingPAGURE_CI_SERVICESenables it.The tests still use Jenkins, it's the currently available CI type and testing the general
Pagure CIfunctionality with it is fine.New CI type should then define additional tests, specific to themselves, in
tests/test_<ci_type>.py.Problem
Currently pagure supports only Jenkins out-of-the-box.
A plugin system is in place but there is Jenkins specific code in global libraries.
Solution
Refactor the code to move all Jenkins specific parts into
pagure/api/ci/jenkins.pyAffected files:
- pagure/lib/tasks_services.py
- pagure/api/init.py
- pagure/hooks/pagure_ci.py
- pagure/lib/lib_ci.py
Goal
Pagure core handles all CI types generic.
Specific code is only located in a single file
pagure/api/ci/<ci_type>.py.They are loaded by adding the name to the config Parameter
PAGURE_CI_SERVICES.