screwdriver-data-schema 21.26.3 → 21.26.4

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.
@@ -3,7 +3,6 @@
3
3
  const Joi = require('joi');
4
4
  const Job = require('./job');
5
5
  const Regex = require('./regex');
6
- const Parameters = require('./parameters');
7
6
 
8
7
  const TEMPLATE_NAMESPACE = Joi.string()
9
8
  .regex(Regex.TEMPLATE_NAMESPACE)
@@ -62,8 +61,6 @@ const TEMPLATE_IMAGES = Joi.object()
62
61
  })
63
62
  .min(1);
64
63
 
65
- const SCHEMA_JOB_PARAMETERS = Parameters.parameters.optional();
66
-
67
64
  const SCHEMA_TEMPLATE = Joi.object().keys({
68
65
  namespace: TEMPLATE_NAMESPACE,
69
66
  name: TEMPLATE_NAME.required(),
@@ -74,8 +71,7 @@ const SCHEMA_TEMPLATE = Joi.object().keys({
74
71
  .required()
75
72
  .or('image', 'template')
76
73
  .or('steps', 'template'),
77
- images: TEMPLATE_IMAGES,
78
- parameters: SCHEMA_JOB_PARAMETERS
74
+ images: TEMPLATE_IMAGES
79
75
  });
80
76
 
81
77
  /**
@@ -93,6 +89,5 @@ module.exports = {
93
89
  maintainer: TEMPLATE_MAINTAINER,
94
90
  config: Job.templateJob,
95
91
  configNoDupSteps: Job.jobNoDupSteps,
96
- images: TEMPLATE_IMAGES,
97
- parameters: SCHEMA_JOB_PARAMETERS
92
+ images: TEMPLATE_IMAGES
98
93
  };
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ const prefix = process.env.DATASTORE_SEQUELIZE_PREFIX || '';
4
+ const table = `${prefix}templates`;
5
+
6
+ module.exports = {
7
+ // eslint-disable-next-line no-unused-vars
8
+ up: async (queryInterface, Sequelize) => {
9
+ try {
10
+ await queryInterface.removeColumn(table, 'parameters');
11
+ // eslint-disable-next-line no-empty
12
+ } catch (e) {}
13
+ }
14
+ };
@@ -32,8 +32,7 @@ const MODEL = {
32
32
  .description('When this template was created')
33
33
  .example('2038-01-19T03:14:08.131Z'),
34
34
  trusted: Joi.boolean().description('Mark whether template is trusted'),
35
- latest: Joi.boolean().description('Whether this is latest version'),
36
- parameters: Template.parameters
35
+ latest: Joi.boolean().description('Whether this is latest version')
37
36
  };
38
37
 
39
38
  const CREATE_MODEL = { ...MODEL, config: Template.configNoDupSteps };
@@ -65,7 +64,7 @@ module.exports = {
65
64
  mutate(
66
65
  MODEL,
67
66
  ['id', 'labels', 'name', 'version', 'description', 'maintainer', 'pipelineId'],
68
- ['config', 'namespace', 'images', 'createTime', 'trusted', 'latest', 'parameters']
67
+ ['config', 'namespace', 'images', 'createTime', 'trusted', 'latest']
69
68
  )
70
69
  ).label('Get Template'),
71
70
 
@@ -79,7 +78,7 @@ module.exports = {
79
78
  mutate(
80
79
  CREATE_MODEL,
81
80
  ['config', 'name', 'version', 'description', 'maintainer'],
82
- ['labels', 'namespace', 'images', 'parameters']
81
+ ['labels', 'namespace', 'images']
83
82
  )
84
83
  ).label('Create Template'),
85
84
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-data-schema",
3
- "version": "21.26.3",
3
+ "version": "21.26.4",
4
4
  "description": "Internal Data Schema of Screwdriver",
5
5
  "main": "index.js",
6
6
  "scripts": {