3cf16eb42d
Fixes: https://pagure.io/pungi/issue/1045 JIRA: COMPOSE-2946 Signed-off-by: Haibo Lin <hlin@redhat.com>
24 lines
604 B
Python
24 lines
604 B
Python
from __future__ import print_function
|
|
|
|
import argparse
|
|
import json
|
|
import os
|
|
import sys
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument('cmd')
|
|
opts = parser.parse_args()
|
|
|
|
data = json.load(sys.stdin)
|
|
compose = data["location"]
|
|
|
|
dest = os.environ["_PUNGI_ORCHESTRATOR_PROGRESS_MONITOR"]
|
|
|
|
with open(dest, "a") as f:
|
|
if opts.cmd == "phase-start":
|
|
print("%s: phase %s started" % (compose, data["phase_name"]), file=f)
|
|
elif opts.cmd == "phase-stop":
|
|
print("%s: phase %s finished" % (compose, data["phase_name"]), file=f)
|