From c3936950eb5d6a9806e4af179016cf85f320e12a Mon Sep 17 00:00:00 2001 From: mwiegand Date: Sun, 14 Nov 2021 22:11:27 +0100 Subject: [PATCH] wip --- build_server/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_server/__init__.py b/build_server/__init__.py index 6ef398a..c7ad397 100644 --- a/build_server/__init__.py +++ b/build_server/__init__.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +from os import environ from flask import Flask, request from functools import cache from subprocess import check_output @@ -12,7 +13,7 @@ def build(): strategy = request.args['strategy'] hook_data = request.get_json() print(hook_data) - return check_output([f'/opt/build-server/strategies/{strategy}', json.dumps(hook_data)]) + return check_output([f"/{environ['STRATEGIES_DIR']}/{strategy}", json.dumps(hook_data)]) if __name__ =='__main__':