screwdriver-data-schema 22.9.15 → 22.9.17

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,32 @@
1
+ /* eslint-disable new-cap */
2
+
3
+ 'use strict';
4
+
5
+ const prefix = process.env.DATASTORE_SEQUELIZE_PREFIX || '';
6
+ const table = `${prefix}stages`;
7
+
8
+ /** @type {import('sequelize-cli').Migration} */
9
+ module.exports = {
10
+ up: async (queryInterface, Sequelize) => {
11
+ await queryInterface.sequelize.transaction(async transaction => {
12
+ await queryInterface.changeColumn(
13
+ table,
14
+ 'setup',
15
+ {
16
+ type: Sequelize.INTEGER,
17
+ allowNull: false
18
+ },
19
+ { transaction }
20
+ );
21
+ await queryInterface.changeColumn(
22
+ table,
23
+ 'teardown',
24
+ {
25
+ type: Sequelize.INTEGER,
26
+ allowNull: false
27
+ },
28
+ { transaction }
29
+ );
30
+ });
31
+ }
32
+ };
package/models/build.js CHANGED
@@ -36,7 +36,7 @@ const MODEL = {
36
36
  parentBuildId: Joi.array()
37
37
  .items(PARENT_BUILD_ID)
38
38
  .description('Identifier(s) of this parent build(s)')
39
- .example([123, 234]),
39
+ .example([111, 222]),
40
40
 
41
41
  parentBuilds: Joi.object()
42
42
  .pattern(
@@ -104,9 +104,8 @@ const MODEL = {
104
104
  };
105
105
 
106
106
  const parentBuildIdSchema = Joi.alternatives()
107
- .try(Joi.array().items(PARENT_BUILD_ID), PARENT_BUILD_ID)
108
- .description('Identifier(s) of this parent build')
109
- .example([123, 234]);
107
+ .try(MODEL.parentBuildId, PARENT_BUILD_ID)
108
+ .description('Identifier(s) of this parent build');
110
109
 
111
110
  const environmentSchema = Joi.alternatives().try(Joi.array().items(Job.environment), Job.environment);
112
111
 
package/models/event.js CHANGED
@@ -50,7 +50,7 @@ const MODEL = {
50
50
  .example('~commit'),
51
51
  type: Joi.string().valid('pr', 'pipeline').max(10).description('Type of the event').example('pr'),
52
52
  workflowGraph: WorkflowGraph.workflowGraph.description('Graph representation of the workflow').example({
53
- nodes: [{ name: '~commit' }, { name: 'main' }, { name: 'publish' }],
53
+ nodes: [{ name: '~commit' }, { name: 'main', id: 12345678 }, { name: 'publish', id: 23456789 }],
54
54
  edges: [
55
55
  { src: '~commit', dest: 'main' },
56
56
  { src: 'main', dest: 'publish' }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-data-schema",
3
- "version": "22.9.15",
3
+ "version": "22.9.17",
4
4
  "description": "Internal Data Schema of Screwdriver",
5
5
  "main": "index.js",
6
6
  "scripts": {