aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2013-04-23 19:31:08 +0300
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2013-04-23 19:31:08 +0300
commit2112311e84ce2d6dd5fd5a68f641c585187dac31 (patch)
tree4b30a61eb2ccc40e43d30cb59100fe98ac3da672 /utils
parent9fe704092d2caea9757425e2338e024d6d242368 (diff)
Add --host option for testing new publishing hosts.
Diffstat (limited to 'utils')
-rwxr-xr-xutils/new-publish/propagate.py3
-rwxr-xr-xutils/new-publish/publish4
2 files changed, 6 insertions, 1 deletions
diff --git a/utils/new-publish/propagate.py b/utils/new-publish/propagate.py
index 6a9b166..f795d83 100755
--- a/utils/new-publish/propagate.py
+++ b/utils/new-publish/propagate.py
@@ -26,6 +26,7 @@ if __name__ == "__main__":
optparser.add_option("--identity-publish", metavar="KEY", default=PUBLISH_KEY_FILE, help="Publish SSH key file")
optparser.add_option("--identity-trigger", metavar="KEY", default=TRIGGER_KEY_FILE, help="Trigger SSH key file")
optparser.add_option("-n", "--dry-run", action="store_true", help="Don't actually publish files, log commands")
+ optparser.add_option("--host", help="Override destination publishing host, for debugging")
optparser.add_option("--step", default="all", help="Run only specific step")
options, args = optparser.parse_args(sys.argv[1:])
if len(args) != 1:
@@ -39,6 +40,8 @@ if __name__ == "__main__":
else:
remote_host = REMOTE_HOST_PRODUCTION
opt_staging = ""
+ if options.host:
+ remote_host = options.host
if options.step in ("all", "1"):
file_list = []
diff --git a/utils/new-publish/publish b/utils/new-publish/publish
index c312ecb..a96ad4e 100755
--- a/utils/new-publish/publish
+++ b/utils/new-publish/publish
@@ -23,6 +23,7 @@ if __name__ == "__main__":
optparser.add_option("--identity-copy", metavar="KEY", default=COPY_KEY_FILE, help="SSH key file")
optparser.add_option("--identity-trigger", metavar="KEY", default=TRIGGER_KEY_FILE, help="SSH key file")
optparser.add_option("-n", "--dry-run", action="store_true", help="Don't actually publish files, log commands")
+ optparser.add_option("--host", help="Override destination publishing host, for debugging")
options, args = optparser.parse_args(sys.argv[1:])
if len(args) < 2:
optparser.error("Wrong number of arguments")
@@ -49,9 +50,10 @@ if __name__ == "__main__":
upload_script = publib.make_upload_script(file_list, UPLOAD_DIR, build_id, options.strip)
publib.upload_files(upload_script, REMOTE_HOST, COPY_USER_NAME, options.identity_copy, options)
- rc = os.system("ssh -i %s %s@%s propagate.py %s %s" % (options.identity_trigger,
+ rc = os.system("ssh -i %s %s@%s propagate.py %s %s %s" % (options.identity_trigger,
TRIGGER_USER_NAME, REMOTE_HOST,
"-s" if options.staging else "",
+ "--host=%s" % options.host if options.host else "",
build_id))
if rc != 0:
print "Publishing failed"