Commit 009da5c7 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

docker: send extended_target commands

parent d8ac688d
Pipeline #15504 passed with stage
in 5 minutes and 15 seconds
......@@ -137,7 +137,11 @@ def docker(request):
filters = request.GET.dict()
if 'cmd' in filters and filters['cmd'] in ['push', 'pull', 'build']:
cmd = filters.pop('cmd')
images = models.Image.objects.filter(target__active=True).filter(**filters)
if 'target__name' in filters:
filters['robotpkg__extended_target__name'] = filters['target__name']
filters['target__active'] = True
images = models.Image.objects.filter(**filters)
return HttpResponse('\n'.join([' '.join(getattr(image, cmd)()) for image in images]), content_type="text/plain")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment