mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Merge pull request #2240 from vector-im/dbkr/redeploy_config
Make redeploy script symlink config
This commit is contained in:
commit
5acb6b0b37
@ -5,8 +5,8 @@ from urlparse import urljoin
|
|||||||
from flask import Flask, jsonify, request, abort
|
from flask import Flask, jsonify, request, abort
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
arg_jenkins_url, arg_extract_path, arg_should_clean, arg_symlink = (
|
arg_jenkins_url, arg_extract_path, arg_should_clean, arg_symlink, arg_config_location = (
|
||||||
None, None, None, None
|
None, None, None, None, None
|
||||||
)
|
)
|
||||||
|
|
||||||
def download_file(url):
|
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=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({})
|
return jsonify({})
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
@ -162,9 +164,10 @@ if __name__ == "__main__":
|
|||||||
arg_extract_path = args.extract
|
arg_extract_path = args.extract
|
||||||
arg_should_clean = args.clean
|
arg_should_clean = args.clean
|
||||||
arg_symlink = args.symlink
|
arg_symlink = args.symlink
|
||||||
|
arg_config_location = args.config
|
||||||
print(
|
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,
|
(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)
|
app.run(host="0.0.0.0", port=args.port, debug=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user