From 7df4f208215e112c7d2315d78ba77223815ddcfb Mon Sep 17 00:00:00 2001 From: cramakri <cramakri> Date: Thu, 16 May 2013 14:04:14 +0000 Subject: [PATCH] SWE-21 SP-638 : Simplified download installer script SVN: 29156 --- .../source/python/download_installer.py | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/openbis_all/source/python/download_installer.py b/openbis_all/source/python/download_installer.py index e5cc1f89481..bc0198ff38f 100755 --- a/openbis_all/source/python/download_installer.py +++ b/openbis_all/source/python/download_installer.py @@ -20,22 +20,7 @@ def run_cmd(cmd): print("\n") return subprocess.check_output(cmd) -def get_files_ssh(proj_name, extension): - # configuration -- server name and location of artifacts - artifacts_folder = "hudson/jobs" - - last_build_folder = "%(artifacts_folder)s/%(proj_name)s/lastSuccessful/archive/_main/targets/dist" % vars() - list_cmd = "ls -1 %s | sort | tail -1" % last_build_folder - server = build_server - last_build_cmd = "ssh -T %(server)s '%(list_cmd)s'" % vars() - last_build = run_cmd(last_build_cmd) - msg = "Fetching artificts for %s : %s\n" % (proj_name, last_build) - print(msg) - output_dir = dest_dir - retrieve_files_cmd = "scp %(server)s:%(last_build_folder)s/*.%(extension)s %(output_dir)s/" % vars() - run_cmd(retrieve_files_cmd) - def get_artifacts_list(proj_name): build_info_cmd = ["ssh", "-T", build_server, "curl", "-s", "%s/job/%s/lastSuccessfulBuild/api/json" % (server_url, proj_name)] json_string = run_cmd(build_info_cmd) @@ -54,7 +39,7 @@ def get_artifact(proj_name, artifact): dl_cmd = ["scp", server_file, dest_dir] run_cmd(dl_cmd) -def get_files_rest(proj_name, extension): +def get_files(proj_name, extension): artifacts = get_artifacts_list(proj_name) artifact_to_get = None for artifact in artifacts: @@ -65,8 +50,6 @@ def get_files_rest(proj_name, extension): return get_artifact(proj_name, artifact_to_get) -def get_files(proj_name, extension): - get_files_rest(proj_name, extension) def clean_installer_dir(): files_to_delete = glob.glob(os.path.join(dest_dir, "openBIS-installation-standard-technologies-*-*.tar.gz")) -- GitLab