This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Hook scripts
Martin Kutlák edited this page Jan 3, 2020
·
2 revisions
Hooks allow you to run custom executables in between stages of retracing process.
- pre_retrace — Before starting of the retracing itself.
- post_retrace — After retracing is done.
- success — After retracing success.
- fail — After retracing fails.
- pre_start — When self.start() is called.
- start — When task type is determined and the main task starts.
- pre_prepare_environment — Before the preparation of retrace environment.
- post_prepare_environment — After the preparation of retrace environment.
- pre_prepare_debuginfo — Before the preparation of debuginfo packages.
- post_prepare_debuginfo — After the preparation of debuginfo packages.
- pre_clean_task — Before cleaning task.
- post_clean_task — After cleaning task.
- pre_remove_task — Before removing task.
- post_remove_task — After removing task.
You can place any executable into one of the sub-directories of /usr/libexec/retrace-server/hooks/
.
Found executables are executed in alphabetical order when hooks are triggered during retracing.
- Default values
- Values from
/etc/retrace-server/retrace-server-hooks.conf
- Values from
/etc/retrace-server/hooks/**.conf
- Values from
[section.EXECUTABLE]
from/etc/retrace-server/hooks/**.conf
- Values from
$HOME/.config/retrace-server/retrace-server-hooks.conf
- Values from
$HOME/.config/retrace-server/hooks/**.conf
- Values from
[section.EXECUTABLE]
from$HOME/.config/retrace-server/hooks/**.conf
For the hooks you can configure:
-
timeout
— Allowed time (in seconds) before the hook execution fails. -
cmdline
— Command line options with optional variables{hook_name}
,{taskid}
,{task_results_dir}
.
In /etc/retrace-server/hooks/start.conf
add:
[start]
timeout=30
[start.Hello_World]
timeout=123
In /etc/retrace-server/hooks/start.conf
[start.echo]
cmdline="Hello World {taskid}"
Which will print Hello World 20200101
during a start retracing stage.