[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 04/29] tests/docker: add "fetch" sub-command
From: |
Alex Bennée |
Subject: |
[PULL v2 04/29] tests/docker: add "fetch" sub-command |
Date: |
Tue, 18 May 2021 10:06:55 +0100 |
This simply wraps up fetching a build from the registry and tagging it
as the local build.
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210512102051.12134-6-alex.bennee@linaro.org>
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 7a14058801..4d9bb7c7ed 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -515,6 +515,23 @@ def run(self, args, argv):
return 0
+class FetchCommand(SubCommand):
+ """ Fetch a docker image from the registry. Args: <tag> <registry>"""
+ name = "fetch"
+
+ def args(self, parser):
+ parser.add_argument("tag",
+ help="Local tag for image")
+ parser.add_argument("registry",
+ help="Docker registry")
+
+ def run(self, args, argv):
+ dkr = Docker()
+ dkr.command(cmd="pull", quiet=args.quiet,
+ argv=["%s/%s" % (args.registry, args.tag)])
+ dkr.command(cmd="tag", quiet=args.quiet,
+ argv=["%s/%s" % (args.registry, args.tag), args.tag])
+
class UpdateCommand(SubCommand):
""" Update a docker image. Args: <tag> <actions>"""
--
2.20.1
- [PULL v2 00/29] testing and plugin updates, Alex Bennée, 2021/05/18
- [PULL v2 01/29] tests/docker: fix copying of executable in "update", Alex Bennée, 2021/05/18
- [PULL v2 02/29] tests/docker: make executable an optional argument to "update", Alex Bennée, 2021/05/18
- [PULL v2 03/29] tests/docker: allow "update" to add the current user, Alex Bennée, 2021/05/18
- [PULL v2 04/29] tests/docker: add "fetch" sub-command,
Alex Bennée <=
- [PULL v2 06/29] tests/tcg: Use Hexagon Docker image, Alex Bennée, 2021/05/18
- [PULL v2 09/29] tests/docker: Added libbpf library to the docker files., Alex Bennée, 2021/05/18
- [PULL v2 13/29] tests/tcg/tricore: Add build infrastructure, Alex Bennée, 2021/05/18
- [PULL v2 10/29] tests/tcg: Add docker_as and docker_ld cmds, Alex Bennée, 2021/05/18
- [PULL v2 05/29] docker: Add Hexagon image, Alex Bennée, 2021/05/18
- [PULL v2 07/29] gitlab: add build-user-hexagon test, Alex Bennée, 2021/05/18
- [PULL v2 08/29] tests/tcg: don't iterate through other arch compilers, Alex Bennée, 2021/05/18
- [PULL v2 12/29] hw/tricore: Add testdevice for tests in tests/tcg/, Alex Bennée, 2021/05/18
- [PULL v2 11/29] tests/tcg: Run timeout cmds using --foreground, Alex Bennée, 2021/05/18
- [PULL v2 16/29] tests/tcg/tricore: Add bmerge test, Alex Bennée, 2021/05/18