screwdriver-data-schema 22.0.4 → 22.2.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}buildClusters`;
|
|
7
|
+
|
|
8
|
+
module.exports = {
|
|
9
|
+
up: async (queryInterface, Sequelize) => {
|
|
10
|
+
await queryInterface.sequelize.transaction(async transaction => {
|
|
11
|
+
await queryInterface.addColumn(
|
|
12
|
+
table,
|
|
13
|
+
'group',
|
|
14
|
+
{
|
|
15
|
+
type: Sequelize.TEXT('medium'),
|
|
16
|
+
defaultValue: 'on-prem',
|
|
17
|
+
allowNull: false
|
|
18
|
+
},
|
|
19
|
+
{ transaction }
|
|
20
|
+
);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
};
|
package/models/buildCluster.js
CHANGED
|
@@ -31,7 +31,13 @@ const MODEL = {
|
|
|
31
31
|
|
|
32
32
|
maintainer: Command.maintainer,
|
|
33
33
|
|
|
34
|
-
weightage: Joi.number().min(0).max(100).description('Weight percentage for build cluster').example(20)
|
|
34
|
+
weightage: Joi.number().min(0).max(100).description('Weight percentage for build cluster').example(20),
|
|
35
|
+
|
|
36
|
+
group: Joi.string()
|
|
37
|
+
.valid('on-prem', 'aws', 'gcp')
|
|
38
|
+
.default('on-prem')
|
|
39
|
+
.description('Group of the build cluster')
|
|
40
|
+
.example('aws')
|
|
35
41
|
};
|
|
36
42
|
|
|
37
43
|
module.exports = {
|
|
@@ -68,7 +74,8 @@ module.exports = {
|
|
|
68
74
|
'isActive',
|
|
69
75
|
'managedByScrewdriver',
|
|
70
76
|
'maintainer',
|
|
71
|
-
'weightage'
|
|
77
|
+
'weightage',
|
|
78
|
+
'group'
|
|
72
79
|
],
|
|
73
80
|
['description']
|
|
74
81
|
)
|
|
@@ -91,7 +98,8 @@ module.exports = {
|
|
|
91
98
|
'managedByScrewdriver',
|
|
92
99
|
'maintainer',
|
|
93
100
|
'weightage',
|
|
94
|
-
'scmContext'
|
|
101
|
+
'scmContext',
|
|
102
|
+
'group'
|
|
95
103
|
]
|
|
96
104
|
)
|
|
97
105
|
).label('Update BuildCluster'),
|
package/package.json
CHANGED
package/plugins/scm.js
CHANGED
|
@@ -109,7 +109,14 @@ const ADD_PR_COMMENT = Joi.object()
|
|
|
109
109
|
scmUri,
|
|
110
110
|
token,
|
|
111
111
|
prNum: core.scm.hook.extract('prNum').required(),
|
|
112
|
-
|
|
112
|
+
comments: Joi.array()
|
|
113
|
+
.items(
|
|
114
|
+
Joi.object().keys({
|
|
115
|
+
text: Joi.string().required(),
|
|
116
|
+
keyword: Joi.string().optional()
|
|
117
|
+
})
|
|
118
|
+
)
|
|
119
|
+
.required(),
|
|
113
120
|
jobName,
|
|
114
121
|
pipelineId,
|
|
115
122
|
scmContext
|