From 838608afab87af26d67145aebdf3de6769b716e2 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 16 Sep 2016 18:15:15 +0100 Subject: [PATCH] Make redeploy script symlink config --- deploy/redeploy.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/deploy/redeploy.py b/deploy/redeploy.py index fd81929a07..5965f10dc9 100755 --- a/deploy/redeploy.py +++ b/deploy/redeploy.py @@ -5,8 +5,8 @@ from urlparse import urljoin from flask import Flask, jsonify, request, abort app = Flask(__name__) -arg_jenkins_url, arg_extract_path, arg_should_clean, arg_symlink = ( - None, None, None, None +arg_jenkins_url, arg_extract_path, arg_should_clean, arg_symlink, arg_config_location = ( + None, None, None, None, None ) def download_file(url): @@ -122,6 +122,8 @@ def on_receive_jenkins_poke(): create_symlink(source=os.path.join(untar_location, "vector"), linkname=arg_symlink) + create_symlink(source=arg_config_location linkname=os.path.join(untar_location, "vector", 'config.json')) + return jsonify({}) if __name__ == "__main__": @@ -162,9 +164,10 @@ if __name__ == "__main__": arg_extract_path = args.extract arg_should_clean = args.clean arg_symlink = args.symlink + arg_config_location = args.config print( - "Listening on port %s. Extracting to %s%s. Symlinking to %s. Jenkins URL: %s" % + "Listening on port %s. Extracting to %s%s. Symlinking to %s. Jenkins URL: %s. Config location: %s" % (args.port, arg_extract_path, - " (clean after)" if arg_should_clean else "", arg_symlink, arg_jenkins_url) + " (clean after)" if arg_should_clean else "", arg_symlink, arg_jenkins_url, arg_config_location) ) app.run(host="0.0.0.0", port=args.port, debug=True)