diff --git a/doc/messaging.rst b/doc/messaging.rst index 291206f2..c94ef40b 100644 --- a/doc/messaging.rst +++ b/doc/messaging.rst @@ -12,8 +12,9 @@ happened. A JSON-encoded object will be passed to standard input to provide more information about the event. At the very least, the object will contain a ``compose_id`` key. -The script is invoked in compose directory and can read other information -there. +The notification script inherits working directory from the parent process and it +can be called from the same directory ``pungi-koji`` is called from. The working directory +is listed at the start of main log. Currently these messages are sent: diff --git a/pungi/notifier.py b/pungi/notifier.py index 5eed865c..bef2ae63 100644 --- a/pungi/notifier.py +++ b/pungi/notifier.py @@ -81,9 +81,6 @@ class PungiNotifier(object): self._update_args(kwargs) - if self.compose: - workdir = self.compose.paths.compose.topdir() - with self.lock: for cmd in self.cmds: self._run_script(cmd, msg, workdir, kwargs) diff --git a/tests/test_notifier.py b/tests/test_notifier.py index 445b6ff3..914d6314 100644 --- a/tests/test_notifier.py +++ b/tests/test_notifier.py @@ -73,7 +73,7 @@ class TestNotifier(unittest.TestCase): stdin_data=json.dumps(data), can_fail=True, return_stdout=False, - workdir=self.compose.paths.compose.topdir.return_value, + workdir=None, universal_newlines=True, show_cmd=True, logfile=self.logfile,