Skip to content

Commit 5acb6b0

Browse files
authored
Merge pull request element-hq#2240 from vector-im/dbkr/redeploy_config
Make redeploy script symlink config
2 parents 196b352 + 838608a commit 5acb6b0

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎deploy/redeploy.py‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from flask import Flask, jsonify, request, abort
66
app = Flask(__name__)
77

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
1010
)
1111

1212
def download_file(url):
@@ -122,6 +122,8 @@ def on_receive_jenkins_poke():
122122

123123
create_symlink(source=os.path.join(untar_location, "vector"), linkname=arg_symlink)
124124

125+
create_symlink(source=arg_config_location linkname=os.path.join(untar_location, "vector", 'config.json'))
126+
125127
return jsonify({})
126128

127129
if __name__ == "__main__":
@@ -162,9 +164,10 @@ def on_receive_jenkins_poke():
162164
arg_extract_path = args.extract
163165
arg_should_clean = args.clean
164166
arg_symlink = args.symlink
167+
arg_config_location = args.config
165168
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" %
167170
(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)
169172
)
170173
app.run(host="0.0.0.0", port=args.port, debug=True)

0 commit comments

Comments
 (0)