Commit c94cdc5f authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

build args: add CATEGORY

parent d0aaf2c8
Pipeline #3031 passed with stages
in 1 minute and 19 seconds
...@@ -13,9 +13,8 @@ from django.utils import timezone ...@@ -13,9 +13,8 @@ from django.utils import timezone
from django.utils.dateparse import parse_datetime from django.utils.dateparse import parse_datetime
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
import requests
import git import git
import requests
from autoslug import AutoSlugField from autoslug import AutoSlugField
from ndh.models import Links, NamedModel, TimeStampedModel from ndh.models import Links, NamedModel, TimeStampedModel
from ndh.utils import enum_to_choices, query_sum from ndh.utils import enum_to_choices, query_sum
...@@ -771,7 +770,12 @@ class Image(models.Model): ...@@ -771,7 +770,12 @@ class Image(models.Model):
return f'{self.robotpkg}{py}:{self.target}' return f'{self.robotpkg}{py}:{self.target}'
def get_build_args(self): def get_build_args(self):
ret = {'TARGET': self.target, 'ROBOTPKG': self.robotpkg, 'REGISTRY': self.robotpkg.project.registry()} ret = {
'TARGET': self.target,
'ROBOTPKG': self.robotpkg,
'REGISTRY': self.robotpkg.project.registry(),
'CATEGORY': self.robotpkg.category,
}
if not self.robotpkg.project.public: if not self.robotpkg.project.public:
ret['IMAGE'] = 'robotpkg-jrl-py3' if self.py3 else 'robotpkg-jrl' ret['IMAGE'] = 'robotpkg-jrl-py3' if self.py3 else 'robotpkg-jrl'
elif self.py3: elif self.py3:
......
Markdown is supported
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