From a4b5f79e8f075cf1843883cfff698c57d028d633 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 17 Feb 2021 18:59:40 +0100 Subject: [PATCH] Add capability to download only one artifact --- tools/release/download_buildkite_artifacts.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/release/download_buildkite_artifacts.py b/tools/release/download_buildkite_artifacts.py index 067a1a4dfe..cd1abecfa5 100755 --- a/tools/release/download_buildkite_artifacts.py +++ b/tools/release/download_buildkite_artifacts.py @@ -41,6 +41,9 @@ parser.add_argument('-b', type=int, required=True, help='the buildkite build number.') +parser.add_argument('-f', + '--filename', + help='the filename, to download only one artifact.') parser.add_argument('-e', '--expecting', type=int, @@ -148,6 +151,8 @@ for elt in data: print(" %s: %s" % (key, str(value))) url = elt.get("download_url") filename = elt.get("filename") + if args.filename is not None and args.filename != filename: + continue target = targetDir + "/" + filename print("Downloading %s to '%s'..." % (filename, targetDir)) if not args.simulate: