diff options
| author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-07-15 13:01:56 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-23 20:06:57 +0100 |
| commit | 5aba3d7fcc3a9edf477bedeced96444b2fbcb8be (patch) | |
| tree | f273adece5de31e95cc6f6e24b216706ed43c859 /bitbake/lib/toaster/bldcontrol | |
| parent | 6cfb76fa8bd1c192e6a0524b7670e2172e5d8e26 (diff) | |
| download | poky-5aba3d7fcc3a9edf477bedeced96444b2fbcb8be.tar.gz | |
bitbake: toaster: improved Project models
A layer may live in a subdirectory of a git repository,
so we add a field to track this setting in the Project layers.
We add the Project schedule_build function, which creates
a build request from the current project configuration.
We also fix an import problem with Projects in views.
(Bitbake rev: 1b5835e5d48cbfb7d38e38437c45d161052dfb37)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol')
| -rw-r--r-- | bitbake/lib/toaster/bldcontrol/migrations/0003_auto__add_field_brlayer_dirpath.py | 99 | ||||
| -rw-r--r-- | bitbake/lib/toaster/bldcontrol/models.py | 2 |
2 files changed, 101 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0003_auto__add_field_brlayer_dirpath.py b/bitbake/lib/toaster/bldcontrol/migrations/0003_auto__add_field_brlayer_dirpath.py new file mode 100644 index 0000000000..b9ba838d90 --- /dev/null +++ b/bitbake/lib/toaster/bldcontrol/migrations/0003_auto__add_field_brlayer_dirpath.py | |||
| @@ -0,0 +1,99 @@ | |||
| 1 | # -*- coding: utf-8 -*- | ||
| 2 | from south.utils import datetime_utils as datetime | ||
| 3 | from south.db import db | ||
| 4 | from south.v2 import SchemaMigration | ||
| 5 | from django.db import models | ||
| 6 | |||
| 7 | |||
| 8 | class Migration(SchemaMigration): | ||
| 9 | |||
| 10 | def forwards(self, orm): | ||
| 11 | # Adding field 'BRLayer.dirpath' | ||
| 12 | db.add_column(u'bldcontrol_brlayer', 'dirpath', | ||
| 13 | self.gf('django.db.models.fields.CharField')(default='', max_length=254), | ||
| 14 | keep_default=False) | ||
| 15 | |||
| 16 | |||
| 17 | def backwards(self, orm): | ||
| 18 | # Deleting field 'BRLayer.dirpath' | ||
| 19 | db.delete_column(u'bldcontrol_brlayer', 'dirpath') | ||
| 20 | |||
| 21 | |||
| 22 | models = { | ||
| 23 | u'bldcontrol.brlayer': { | ||
| 24 | 'Meta': {'object_name': 'BRLayer'}, | ||
| 25 | 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 26 | 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 27 | 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 28 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 29 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 30 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}) | ||
| 31 | }, | ||
| 32 | u'bldcontrol.brtarget': { | ||
| 33 | 'Meta': {'object_name': 'BRTarget'}, | ||
| 34 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 35 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}), | ||
| 36 | 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 37 | 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}) | ||
| 38 | }, | ||
| 39 | u'bldcontrol.brvariable': { | ||
| 40 | 'Meta': {'object_name': 'BRVariable'}, | ||
| 41 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 42 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 43 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}), | ||
| 44 | 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}) | ||
| 45 | }, | ||
| 46 | u'bldcontrol.buildenvironment': { | ||
| 47 | 'Meta': {'object_name': 'BuildEnvironment'}, | ||
| 48 | 'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 49 | 'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}), | ||
| 50 | 'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), | ||
| 51 | 'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 52 | 'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}), | ||
| 53 | 'betype': ('django.db.models.fields.IntegerField', [], {}), | ||
| 54 | 'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), | ||
| 55 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
| 56 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 57 | 'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 58 | 'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), | ||
| 59 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) | ||
| 60 | }, | ||
| 61 | u'bldcontrol.buildrequest': { | ||
| 62 | 'Meta': {'object_name': 'BuildRequest'}, | ||
| 63 | 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}), | ||
| 64 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
| 65 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 66 | 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}), | ||
| 67 | 'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 68 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) | ||
| 69 | }, | ||
| 70 | u'orm.build': { | ||
| 71 | 'Meta': {'object_name': 'Build'}, | ||
| 72 | 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}), | ||
| 73 | 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 74 | 'completed_on': ('django.db.models.fields.DateTimeField', [], {}), | ||
| 75 | 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}), | ||
| 76 | 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 77 | 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 78 | 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 79 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 80 | 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 81 | 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}), | ||
| 82 | 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}), | ||
| 83 | 'started_on': ('django.db.models.fields.DateTimeField', [], {}), | ||
| 84 | 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 85 | 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}) | ||
| 86 | }, | ||
| 87 | u'orm.project': { | ||
| 88 | 'Meta': {'object_name': 'Project'}, | ||
| 89 | 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}), | ||
| 90 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
| 91 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 92 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 93 | 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), | ||
| 94 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
| 95 | 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'}) | ||
| 96 | } | ||
| 97 | } | ||
| 98 | |||
| 99 | complete_apps = ['bldcontrol'] \ No newline at end of file | ||
diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py index 8285257c8e..1f253ffb22 100644 --- a/bitbake/lib/toaster/bldcontrol/models.py +++ b/bitbake/lib/toaster/bldcontrol/models.py | |||
| @@ -71,6 +71,8 @@ class BRLayer(models.Model): | |||
| 71 | name = models.CharField(max_length = 100) | 71 | name = models.CharField(max_length = 100) |
| 72 | giturl = models.CharField(max_length = 254) | 72 | giturl = models.CharField(max_length = 254) |
| 73 | commit = models.CharField(max_length = 254) | 73 | commit = models.CharField(max_length = 254) |
| 74 | dirpath = models.CharField(max_length = 254) | ||
| 75 | |||
| 74 | 76 | ||
| 75 | class BRVariable(models.Model): | 77 | class BRVariable(models.Model): |
| 76 | req = models.ForeignKey(BuildRequest) | 78 | req = models.ForeignKey(BuildRequest) |
