screwdriver-api 7.0.85 → 7.0.87
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.
- package/package.json +1 -1
- package/plugins/builds/getBuildStatuses.js +3 -3
- package/plugins/builds/metrics.js +2 -2
- package/plugins/commands/listTags.js +3 -1
- package/plugins/events/listBuilds.js +2 -1
- package/plugins/events/metrics.js +2 -2
- package/plugins/jobs/latestBuild.js +2 -1
- package/plugins/jobs/listBuilds.js +3 -2
- package/plugins/jobs/metrics.js +2 -2
- package/plugins/pipelines/latestCommitEvent.js +2 -1
- package/plugins/pipelines/listJobs.js +3 -1
- package/plugins/pipelines/metrics.js +2 -2
- package/plugins/templates/listVersionsWithMetric.js +4 -2
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const boom = require('@hapi/boom');
|
|
4
4
|
const joi = require('joi');
|
|
5
5
|
const stringSchema = joi.string().regex(/^[0-9]+$/);
|
|
6
|
-
const jobIdsSchema = joi.alternatives().try(joi.array().items(stringSchema), stringSchema).required();
|
|
6
|
+
const jobIdsSchema = joi.alternatives().try(joi.array().items(stringSchema), stringSchema).example(123345).required();
|
|
7
7
|
|
|
8
8
|
module.exports = () => ({
|
|
9
9
|
method: 'GET',
|
|
@@ -46,8 +46,8 @@ module.exports = () => ({
|
|
|
46
46
|
validate: {
|
|
47
47
|
query: joi.object({
|
|
48
48
|
jobIds: jobIdsSchema,
|
|
49
|
-
numBuilds:
|
|
50
|
-
offset:
|
|
49
|
+
numBuilds: joi.number().integer().positive().default(1),
|
|
50
|
+
offset: joi.number().integer().min(0).default(0)
|
|
51
51
|
})
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -58,8 +58,8 @@ module.exports = () => ({
|
|
|
58
58
|
id: buildIdSchema
|
|
59
59
|
}),
|
|
60
60
|
query: joi.object({
|
|
61
|
-
startTime: joi.string().isoDate(),
|
|
62
|
-
endTime: joi.string().isoDate()
|
|
61
|
+
startTime: joi.string().isoDate().example('1970-01-01T15:00:00Z'),
|
|
62
|
+
endTime: joi.string().isoDate().example('1970-01-03T18:00:00Z')
|
|
63
63
|
})
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -52,7 +52,9 @@ module.exports = () => ({
|
|
|
52
52
|
}),
|
|
53
53
|
query: schema.api.pagination.concat(
|
|
54
54
|
joi.object({
|
|
55
|
-
search: joi.forbidden() // we don't support search for Command list tag
|
|
55
|
+
search: joi.forbidden(), // we don't support search for Command list tag
|
|
56
|
+
getCount: joi.forbidden(),
|
|
57
|
+
sortBy: joi.forbidden()
|
|
56
58
|
})
|
|
57
59
|
)
|
|
58
60
|
}
|
|
@@ -52,7 +52,8 @@ module.exports = () => ({
|
|
|
52
52
|
joi.object({
|
|
53
53
|
readOnly: joi.boolean().truthy('true').falsy('false').default(false),
|
|
54
54
|
fetchSteps: joi.boolean().truthy('true').falsy('false').default(true),
|
|
55
|
-
search: joi.forbidden() // we don't support search for Event list builds
|
|
55
|
+
search: joi.forbidden(), // we don't support search for Event list builds
|
|
56
|
+
getCount: joi.forbidden()
|
|
56
57
|
})
|
|
57
58
|
)
|
|
58
59
|
}
|
|
@@ -58,8 +58,8 @@ module.exports = () => ({
|
|
|
58
58
|
id: eventIdSchema
|
|
59
59
|
}),
|
|
60
60
|
query: joi.object({
|
|
61
|
-
startTime: joi.string().isoDate(),
|
|
62
|
-
endTime: joi.string().isoDate()
|
|
61
|
+
startTime: joi.string().isoDate().example('1970-01-01T15:00:00Z'),
|
|
62
|
+
endTime: joi.string().isoDate().example('1970-01-03T18:00:00Z')
|
|
63
63
|
})
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -4,6 +4,7 @@ const boom = require('@hapi/boom');
|
|
|
4
4
|
const joi = require('joi');
|
|
5
5
|
const schema = require('screwdriver-data-schema');
|
|
6
6
|
const idSchema = schema.models.job.base.extract('id');
|
|
7
|
+
const getSchema = schema.models.build.get;
|
|
7
8
|
const statusSchema = schema.models.build.base.extract('status');
|
|
8
9
|
|
|
9
10
|
module.exports = () => ({
|
|
@@ -44,7 +45,7 @@ module.exports = () => ({
|
|
|
44
45
|
});
|
|
45
46
|
},
|
|
46
47
|
response: {
|
|
47
|
-
schema:
|
|
48
|
+
schema: getSchema
|
|
48
49
|
},
|
|
49
50
|
validate: {
|
|
50
51
|
params: joi.object({
|
|
@@ -72,10 +72,11 @@ module.exports = () => ({
|
|
|
72
72
|
}),
|
|
73
73
|
query: schema.api.pagination.concat(
|
|
74
74
|
joi.object({
|
|
75
|
-
readOnly: joi.boolean().truthy('true').falsy('false').default(
|
|
75
|
+
readOnly: joi.boolean().truthy('true').falsy('false').default(true),
|
|
76
76
|
fetchSteps: joi.boolean().truthy('true').falsy('false').default(true),
|
|
77
77
|
status: statusSchema,
|
|
78
|
-
search: joi.forbidden() // we don't support search for Job list builds
|
|
78
|
+
search: joi.forbidden(), // we don't support search for Job list builds
|
|
79
|
+
getCount: joi.forbidden()
|
|
79
80
|
})
|
|
80
81
|
)
|
|
81
82
|
}
|
package/plugins/jobs/metrics.js
CHANGED
|
@@ -62,8 +62,8 @@ module.exports = () => ({
|
|
|
62
62
|
id: jobIdSchema
|
|
63
63
|
}),
|
|
64
64
|
query: joi.object({
|
|
65
|
-
startTime: joi.string().isoDate(),
|
|
66
|
-
endTime: joi.string().isoDate(),
|
|
65
|
+
startTime: joi.string().isoDate().example('1970-01-01T15:00:00Z'),
|
|
66
|
+
endTime: joi.string().isoDate().example('1970-01-03T18:00:00Z'),
|
|
67
67
|
aggregateInterval: joi.string().valid('none', 'day', 'week', 'month', 'year').messages({
|
|
68
68
|
'any.only': '{{#label}} fails because it must be one of none, day, week, month, year'
|
|
69
69
|
})
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
const boom = require('@hapi/boom');
|
|
4
4
|
const joi = require('joi');
|
|
5
5
|
const schema = require('screwdriver-data-schema');
|
|
6
|
+
const getSchema = schema.models.event.get;
|
|
6
7
|
const idSchema = schema.models.pipeline.base.extract('id');
|
|
7
8
|
|
|
8
9
|
module.exports = () => ({
|
|
@@ -43,7 +44,7 @@ module.exports = () => ({
|
|
|
43
44
|
});
|
|
44
45
|
},
|
|
45
46
|
response: {
|
|
46
|
-
schema:
|
|
47
|
+
schema: getSchema
|
|
47
48
|
},
|
|
48
49
|
validate: {
|
|
49
50
|
params: joi.object({
|
|
@@ -61,7 +61,9 @@ module.exports = () => ({
|
|
|
61
61
|
joi.object({
|
|
62
62
|
archived: joi.boolean().truthy('true').falsy('false').default(false),
|
|
63
63
|
jobName: jobNameSchema,
|
|
64
|
-
search: joi.forbidden() // we don't support search for Pipeline list jobs
|
|
64
|
+
search: joi.forbidden(), // we don't support search for Pipeline list jobs
|
|
65
|
+
getCount: joi.forbidden(),
|
|
66
|
+
sortBy: joi.forbidden()
|
|
65
67
|
})
|
|
66
68
|
)
|
|
67
69
|
}
|
|
@@ -92,8 +92,8 @@ module.exports = () => ({
|
|
|
92
92
|
}),
|
|
93
93
|
query: schema.api.pagination.concat(
|
|
94
94
|
joi.object({
|
|
95
|
-
startTime: joi.string().isoDate(),
|
|
96
|
-
endTime: joi.string().isoDate(),
|
|
95
|
+
startTime: joi.string().isoDate().example('1970-01-01T15:00:00Z'),
|
|
96
|
+
endTime: joi.string().isoDate().example('1970-01-03T18:00:00Z'),
|
|
97
97
|
aggregateInterval: joi.string().valid('none', 'day', 'week', 'month', 'year'),
|
|
98
98
|
'downtimeJobs[]': jobIdsSchema.optional(),
|
|
99
99
|
'downtimeStatuses[]': statusesSchema.optional(),
|
|
@@ -65,8 +65,10 @@ module.exports = () => ({
|
|
|
65
65
|
query: schema.api.pagination.concat(
|
|
66
66
|
joi.object({
|
|
67
67
|
search: joi.forbidden(), // we don't support search for Template list versions with metrics,
|
|
68
|
-
startTime: joi.string().isoDate(),
|
|
69
|
-
endTime: joi.string().isoDate()
|
|
68
|
+
startTime: joi.string().isoDate().example('1970-01-01T15:00:00Z'),
|
|
69
|
+
endTime: joi.string().isoDate().example('1970-01-03T18:00:00Z'),
|
|
70
|
+
getCount: joi.forbidden(),
|
|
71
|
+
sortBy: joi.forbidden()
|
|
70
72
|
})
|
|
71
73
|
)
|
|
72
74
|
}
|