|
5 | 5 | from flask import Flask, jsonify, request, abort |
6 | 6 | app = Flask(__name__) |
7 | 7 |
|
8 | | -arg_jenkins_url, arg_extract_path, arg_should_clean, arg_symlink = ( |
9 | | - None, None, None, None |
| 8 | +arg_jenkins_url, arg_extract_path, arg_should_clean, arg_symlink, arg_config_location = ( |
| 9 | + None, None, None, None, None |
10 | 10 | ) |
11 | 11 |
|
12 | 12 | def download_file(url): |
@@ -122,6 +122,8 @@ def on_receive_jenkins_poke(): |
122 | 122 |
|
123 | 123 | create_symlink(source=os.path.join(untar_location, "vector"), linkname=arg_symlink) |
124 | 124 |
|
| 125 | + create_symlink(source=arg_config_location linkname=os.path.join(untar_location, "vector", 'config.json')) |
| 126 | + |
125 | 127 | return jsonify({}) |
126 | 128 |
|
127 | 129 | if __name__ == "__main__": |
@@ -162,9 +164,10 @@ def on_receive_jenkins_poke(): |
162 | 164 | arg_extract_path = args.extract |
163 | 165 | arg_should_clean = args.clean |
164 | 166 | arg_symlink = args.symlink |
| 167 | + arg_config_location = args.config |
165 | 168 | print( |
166 | | - "Listening on port %s. Extracting to %s%s. Symlinking to %s. Jenkins URL: %s" % |
| 169 | + "Listening on port %s. Extracting to %s%s. Symlinking to %s. Jenkins URL: %s. Config location: %s" % |
167 | 170 | (args.port, arg_extract_path, |
168 | | - " (clean after)" if arg_should_clean else "", arg_symlink, arg_jenkins_url) |
| 171 | + " (clean after)" if arg_should_clean else "", arg_symlink, arg_jenkins_url, arg_config_location) |
169 | 172 | ) |
170 | 173 | app.run(host="0.0.0.0", port=args.port, debug=True) |
0 commit comments