Actions
action #161879
closedcoordination #161168: [epic] Support hooks for obs-sync plugin
hook script support for obs-sync plugin - single hook script before "isos post" size:M
Description
Motivation¶
See discussion in https://suse.slack.com/archives/C02CANHLANP/p1716882218853889 and #159828-9.
In general there is the need to be able to hook into different stages of how OBS Rsync plugin works, or an alternative solution that allows a release manager or maintenance coordinator (with help of QE) to dynamically select/alter the test variables and openqa cli parameters, using a script. Let's start with being able to pass a hook script called with the "isos post" command script and be able to adapt that.
Acceptance criteria¶
- AC1: A "hello world" hook script can be called before actual "isos post" calls in https://github.com/os-autoinst/openqa-trigger-from-obs/
- AC2: hook scripts execution can be skipped based on configuration/convention, e.g. from the .xml files in https://github.com/os-autoinst/openqa-trigger-from-obs/
- AC3: Solution should allow for the user to alter
isos post
behavior (cli parameters and variables, e.g.BETA=1
)
Suggestions¶
- Foresee optional hook scripts in https://github.com/os-autoinst/openqa-trigger-from-obs/ , e.g. in a "hooks/" folder, maybe replicating paths matching https://github.com/os-autoinst/openqa-trigger-from-obs/tree/master/xml/ paths, e.g. for a configuration https://github.com/os-autoinst/openqa-trigger-from-obs/tree/master/xml/openSUSE:Factory.xml read and execute any hook matching https://github.com/os-autoinst/openqa-trigger-from-obs/tree/master/hooks/openSUSE:Factory-* . For now it's enough if just one script is supported not multiple.
- Call the hook scripts as part of the openQA sync plugin, e.g. immediately before the actual "isos post" hook script invocation.
- Simply pass the product triggering script as string, e.g. https://openqa.opensuse.org/admin/obs_rsync/KDE:Medias%7Ckrypton/runs/.run_last/download/openqa.cmd, to the hook script and again return a script that will be called
- Emulate the hook scripts with unit tests within the openQA sync plugin code based on the above convention https://github.com/os-autoinst/openQA/blob/master/t/api/14-plugin_obs_rsync*.t or also the corresponding UI tests, e.g. t/ui/27-plugin_obs_rsync*.t
- Mention hook scripts in the README
Out of scope¶
- Implementing actual hook scripts, other than the hello world example (reference). #161750
- Solution should allow for multiple hooks to coexist (think how git hooks behave)
Actions