diff options
| author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-02-16 17:47:07 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-20 12:58:19 +0000 |
| commit | c368d83bd6b34c2420c3d1d7269d8dc2edba1ce9 (patch) | |
| tree | d6a905444fe2ea0f0313bc4b848430108ac17388 /bitbake/lib/toaster/bldcontrol/migrations | |
| parent | a574f293fe16612df446d3b7fef71adcab4773e9 (diff) | |
| download | poky-c368d83bd6b34c2420c3d1d7269d8dc2edba1ce9.tar.gz | |
bitbake: toaster: bitbake cooker log saving and downloading
This patch brings in cooker log saving and proper download links.
* toasterui will now write the cooker log file if running in managed
mode
* the BuildRequest has a new state, REQ_ARCHIVE, indicating that the
build is completed, and the artifacts are ready to be grabbed
* the runbuild test execution commands will gather needed artifacts,
and save them to a storage directory selected during Toaster setup.
* the build dashboard, project builds and all builds pages have
permanent links for the cooker log
[YOCTO #7220]
[YOCTO #7206]
(Bitbake rev: fad80e36c9da663b000cdf2cb3c75440c6431d84)
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/migrations')
| -rw-r--r-- | bitbake/lib/toaster/bldcontrol/migrations/0008_brarchive.py | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0008_brarchive.py b/bitbake/lib/toaster/bldcontrol/migrations/0008_brarchive.py new file mode 100644 index 0000000000..f5469607f3 --- /dev/null +++ b/bitbake/lib/toaster/bldcontrol/migrations/0008_brarchive.py | |||
| @@ -0,0 +1,138 @@ | |||
| 1 | # -*- coding: utf-8 -*- | ||
| 2 | from south.utils import datetime_utils as datetime | ||
| 3 | from south.db import db | ||
| 4 | from south.v2 import DataMigration | ||
| 5 | from django.db import models | ||
| 6 | |||
| 7 | class Migration(DataMigration): | ||
| 8 | # ids that cannot be imported from BuildRequest | ||
| 9 | |||
| 10 | def forwards(self, orm): | ||
| 11 | REQ_COMPLETED = 3 | ||
| 12 | REQ_ARCHIVE = 6 | ||
| 13 | "Write your forwards methods here." | ||
| 14 | # Note: Don't use "from appname.models import ModelName". | ||
| 15 | # Use orm.ModelName to refer to models in this application, | ||
| 16 | # and orm['appname.ModelName'] for models in other applications. | ||
| 17 | orm.BuildRequest.objects.filter(state=REQ_COMPLETED).update(state=REQ_ARCHIVE) | ||
| 18 | |||
| 19 | def backwards(self, orm): | ||
| 20 | REQ_COMPLETED = 3 | ||
| 21 | REQ_ARCHIVE = 6 | ||
| 22 | "Write your backwards methods here." | ||
| 23 | orm.BuildRequest.objects.filter(state=REQ_ARCHIVE).update(state=REQ_COMPLETED) | ||
| 24 | |||
| 25 | models = { | ||
| 26 | u'bldcontrol.brbitbake': { | ||
| 27 | 'Meta': {'object_name': 'BRBitbake'}, | ||
| 28 | 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 29 | 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 30 | 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 31 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 32 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']", 'unique': 'True'}) | ||
| 33 | }, | ||
| 34 | u'bldcontrol.brerror': { | ||
| 35 | 'Meta': {'object_name': 'BRError'}, | ||
| 36 | 'errmsg': ('django.db.models.fields.TextField', [], {}), | ||
| 37 | 'errtype': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 38 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 39 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}), | ||
| 40 | 'traceback': ('django.db.models.fields.TextField', [], {}) | ||
| 41 | }, | ||
| 42 | u'bldcontrol.brlayer': { | ||
| 43 | 'Meta': {'object_name': 'BRLayer'}, | ||
| 44 | 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 45 | 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 46 | 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 47 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 48 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 49 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}) | ||
| 50 | }, | ||
| 51 | u'bldcontrol.brtarget': { | ||
| 52 | 'Meta': {'object_name': 'BRTarget'}, | ||
| 53 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 54 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}), | ||
| 55 | 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 56 | 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}) | ||
| 57 | }, | ||
| 58 | u'bldcontrol.brvariable': { | ||
| 59 | 'Meta': {'object_name': 'BRVariable'}, | ||
| 60 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 61 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 62 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}), | ||
| 63 | 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}) | ||
| 64 | }, | ||
| 65 | u'bldcontrol.buildenvironment': { | ||
| 66 | 'Meta': {'object_name': 'BuildEnvironment'}, | ||
| 67 | 'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 68 | 'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}), | ||
| 69 | 'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), | ||
| 70 | 'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 71 | 'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}), | ||
| 72 | 'betype': ('django.db.models.fields.IntegerField', [], {}), | ||
| 73 | 'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), | ||
| 74 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
| 75 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 76 | 'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 77 | 'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), | ||
| 78 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) | ||
| 79 | }, | ||
| 80 | u'bldcontrol.buildrequest': { | ||
| 81 | 'Meta': {'object_name': 'BuildRequest'}, | ||
| 82 | 'build': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['orm.Build']", 'unique': 'True', 'null': 'True'}), | ||
| 83 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
| 84 | 'environment': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildEnvironment']", 'null': 'True'}), | ||
| 85 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 86 | 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}), | ||
| 87 | 'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 88 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) | ||
| 89 | }, | ||
| 90 | u'orm.bitbakeversion': { | ||
| 91 | 'Meta': {'object_name': 'BitbakeVersion'}, | ||
| 92 | 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}), | ||
| 93 | 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}), | ||
| 94 | 'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}), | ||
| 95 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 96 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) | ||
| 97 | }, | ||
| 98 | u'orm.build': { | ||
| 99 | 'Meta': {'object_name': 'Build'}, | ||
| 100 | 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}), | ||
| 101 | 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 102 | 'completed_on': ('django.db.models.fields.DateTimeField', [], {}), | ||
| 103 | 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}), | ||
| 104 | 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 105 | 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 106 | 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 107 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 108 | 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 109 | 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}), | ||
| 110 | 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}), | ||
| 111 | 'started_on': ('django.db.models.fields.DateTimeField', [], {}), | ||
| 112 | 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 113 | 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}) | ||
| 114 | }, | ||
| 115 | u'orm.project': { | ||
| 116 | 'Meta': {'object_name': 'Project'}, | ||
| 117 | 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}), | ||
| 118 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
| 119 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 120 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 121 | 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}), | ||
| 122 | 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), | ||
| 123 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
| 124 | 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'}) | ||
| 125 | }, | ||
| 126 | u'orm.release': { | ||
| 127 | 'Meta': {'object_name': 'Release'}, | ||
| 128 | 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}), | ||
| 129 | 'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}), | ||
| 130 | 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), | ||
| 131 | 'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}), | ||
| 132 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 133 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) | ||
| 134 | } | ||
| 135 | } | ||
| 136 | |||
| 137 | complete_apps = ['bldcontrol'] | ||
| 138 | symmetrical = True | ||
