mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
bitbake: toaster: add project related models
We introduce the notion of a project in Toaster as the item that holds the specification for triggering a build: the set of layers used, the set of configuration variable values, and the set of targets to be build. Builds triggered through Toaster will be associated with a Project, and they will be configured based on the project settings at the moment when the build is ordered. (Bitbake rev: 0bf0251ae05442ae260c6099b389bf765c4fef26) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
b68b74ddd4
commit
07cd9a3b34
@@ -23,6 +23,10 @@ from django.db import models
|
|||||||
from django.db.models import F
|
from django.db.models import F
|
||||||
from django.utils.encoding import python_2_unicode_compatible
|
from django.utils.encoding import python_2_unicode_compatible
|
||||||
|
|
||||||
|
class Project(models.Model):
|
||||||
|
name = models.CharField(max_length=100)
|
||||||
|
created = models.DateTimeField(auto_now_add = True)
|
||||||
|
updated = models.DateTimeField(auto_now = True)
|
||||||
|
|
||||||
class Build(models.Model):
|
class Build(models.Model):
|
||||||
SUCCEEDED = 0
|
SUCCEEDED = 0
|
||||||
@@ -37,6 +41,7 @@ class Build(models.Model):
|
|||||||
|
|
||||||
search_allowed_fields = ['machine', 'cooker_log_path', "target__target", "target__target_image_file__file_name"]
|
search_allowed_fields = ['machine', 'cooker_log_path', "target__target", "target__target_image_file__file_name"]
|
||||||
|
|
||||||
|
project = models.ForeignKey(Project)
|
||||||
machine = models.CharField(max_length=100)
|
machine = models.CharField(max_length=100)
|
||||||
distro = models.CharField(max_length=100)
|
distro = models.CharField(max_length=100)
|
||||||
distro_version = models.CharField(max_length=100)
|
distro_version = models.CharField(max_length=100)
|
||||||
@@ -54,6 +59,9 @@ class Build(models.Model):
|
|||||||
tgts = Target.objects.filter(build_id = self.id).order_by( 'target' );
|
tgts = Target.objects.filter(build_id = self.id).order_by( 'target' );
|
||||||
return( tgts );
|
return( tgts );
|
||||||
|
|
||||||
|
class ProjectTarget(models.Model):
|
||||||
|
project = models.ForeignKey(Project)
|
||||||
|
target = models.CharField(max_length=100)
|
||||||
|
|
||||||
@python_2_unicode_compatible
|
@python_2_unicode_compatible
|
||||||
class Target(models.Model):
|
class Target(models.Model):
|
||||||
@@ -324,6 +332,12 @@ class Recipe_Dependency(models.Model):
|
|||||||
dep_type = models.IntegerField(choices=DEPENDS_TYPE)
|
dep_type = models.IntegerField(choices=DEPENDS_TYPE)
|
||||||
objects = Recipe_DependencyManager()
|
objects = Recipe_DependencyManager()
|
||||||
|
|
||||||
|
class ProjectLayer(models.Model):
|
||||||
|
project = models.ForeignKey(Project)
|
||||||
|
name = models.CharField(max_length = 100)
|
||||||
|
giturl = models.CharField(max_length = 254)
|
||||||
|
commit = models.CharField(max_length = 254)
|
||||||
|
|
||||||
class Layer(models.Model):
|
class Layer(models.Model):
|
||||||
name = models.CharField(max_length=100)
|
name = models.CharField(max_length=100)
|
||||||
local_path = models.FilePathField(max_length=255)
|
local_path = models.FilePathField(max_length=255)
|
||||||
@@ -338,6 +352,11 @@ class Layer_Version(models.Model):
|
|||||||
priority = models.IntegerField()
|
priority = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
|
class ProjectVariable(models.Model):
|
||||||
|
project = models.ForeignKey(Project)
|
||||||
|
name = models.CharField(max_length=100)
|
||||||
|
value = models.TextField(blank = True)
|
||||||
|
|
||||||
class Variable(models.Model):
|
class Variable(models.Model):
|
||||||
search_allowed_fields = ['variable_name', 'variable_value',
|
search_allowed_fields = ['variable_name', 'variable_value',
|
||||||
'vhistory__file_name', "description"]
|
'vhistory__file_name', "description"]
|
||||||
|
|||||||
Reference in New Issue
Block a user