Commit 6bc454ec authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

Image.py3

parent ba3482a3
# Generated by Django 2.0.5 on 2018-05-16 14:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rainboard', '0013_target_python3'),
]
operations = [
migrations.AddField(
model_name='image',
name='py3',
field=models.BooleanField(default=False),
),
migrations.AlterUniqueTogether(
name='image',
unique_together={('robotpkg', 'target', 'py3')},
),
]
......@@ -598,18 +598,23 @@ class Image(models.Model):
target = models.ForeignKey(Target, on_delete=models.CASCADE)
created = models.DateTimeField(blank=True, null=True)
image = models.CharField(max_length=12, blank=True, null=True)
py3 = models.BooleanField(default=False)
class Meta:
unique_together = ('robotpkg', 'target')
unique_together = ('robotpkg', 'target', 'py3')
def __str__(self):
if self.py3:
return f'{self.robotpkg}-{self.target}-py3'
return f'{self.robotpkg}-{self.target}'
def get_build_args(self):
ret = {'TARGET': self.target, 'ROBOTPKG': self.robotpkg,
'REGISTRY': self.robotpkg.project.registry()}
if not self.robotpkg.project.public:
ret['IMAGE'] = 'robotpkg-jrl'
ret['IMAGE'] = 'robotpkg-jrl-py3' if self.py3 else 'robotpkg-jrl'
elif self.py3:
ret['IMAGE'] = 'robotpkg-py3'
return ret
def get_image_name(self):
......
......@@ -34,8 +34,8 @@ cache:
{% for image in robotpkg.valid_images %}
robotpkg-{{ image }}:
<<: *robotpkg-{{ robotpkg }}
image: ${IMAGE}:{{ image.target }}
{% if project.docs and image.target.name == '16.04' %} artifacts:
image: ${IMAGE}{% if image.py3 %}-py3{% endif %}:{{ image.target }}
{% if project.docs and image.target.name == '16.04' and not image.py3 %} artifacts:
expire_in: 1 day
paths:
- doxygen-html/
......
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