Fix the wrong working directory for the progress_notification script

Jira: RHELCMP-7901

Signed-off-by: Ozan Unsal <ounsal@redhat.com>
This commit is contained in:
Ozan Unsal 2022-02-28 14:54:21 +01:00 committed by lsedlar
parent 6c280f2c46
commit ecb1646042
3 changed files with 4 additions and 6 deletions

View File

@ -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:

View File

@ -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)

View File

@ -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,