screwdriver-data-schema 25.5.0 → 25.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ /* eslint-disable new-cap */
2
+
3
+ 'use strict';
4
+
5
+ const prefix = process.env.DATASTORE_SEQUELIZE_PREFIX || '';
6
+ const table = `${prefix}events`;
7
+
8
+ module.exports = {
9
+ up: async (queryInterface, Sequelize) => {
10
+ await queryInterface.sequelize.transaction(async transaction => {
11
+ await queryInterface.changeColumn(
12
+ table,
13
+ 'status',
14
+ {
15
+ type: Sequelize.STRING(15),
16
+ defaultValue: 'UNKNOWN',
17
+ allowNull: false
18
+ },
19
+ { transaction }
20
+ );
21
+ });
22
+ }
23
+ };
@@ -0,0 +1,21 @@
1
+ /* eslint-disable new-cap */
2
+
3
+ 'use strict';
4
+
5
+ const prefix = process.env.DATASTORE_SEQUELIZE_PREFIX || '';
6
+ const table = `${prefix}jobs`;
7
+
8
+ module.exports = {
9
+ up: async (queryInterface, Sequelize) => {
10
+ await queryInterface.sequelize.transaction(async transaction => {
11
+ await queryInterface.addColumn(
12
+ table,
13
+ 'sha',
14
+ {
15
+ type: Sequelize.STRING(40)
16
+ },
17
+ { transaction }
18
+ );
19
+ });
20
+ }
21
+ };
package/models/event.js CHANGED
@@ -73,7 +73,7 @@ const MODEL = {
73
73
  baseBranch: Joi.string().description('build base branch').example('develop'),
74
74
  status: Joi.string()
75
75
  .valid(...STATUSES)
76
- .max(10)
76
+ .max(15)
77
77
  .description('Current status of the event')
78
78
  .example('SUCCESS')
79
79
  .default('UNKNOWN')
package/models/job.js CHANGED
@@ -44,7 +44,14 @@ const MODEL = {
44
44
 
45
45
  archived: Joi.boolean().description('Flag if the job is archived').example(true).default(false),
46
46
 
47
- templateId: Joi.number().integer().positive().description("Identifier for this job's template").example(123345)
47
+ templateId: Joi.number().integer().positive().description("Identifier for this job's template").example(123345),
48
+
49
+ sha: Joi.string()
50
+ .hex()
51
+ .length(40)
52
+ .optional()
53
+ .description('SHA this job was built on')
54
+ .example('ccc49349d3cffbd12ea9e3d41521480b4aa5de5f')
48
55
  };
49
56
 
50
57
  const EXTENDED_MODEL = {
@@ -98,7 +105,8 @@ module.exports = {
98
105
  'title',
99
106
  'createTime',
100
107
  'url',
101
- 'userProfile'
108
+ 'userProfile',
109
+ 'sha'
102
110
  ]
103
111
  )
104
112
  ).label('Get Job'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-data-schema",
3
- "version": "25.5.0",
3
+ "version": "25.7.0",
4
4
  "description": "Internal Data Schema of Screwdriver",
5
5
  "main": "index.js",
6
6
  "scripts": {