screwdriver-api 4.1.270 → 4.1.273
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "screwdriver-api",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.273",
|
|
4
4
|
"description": "API server for the Screwdriver.cd service",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"screwdriver-config-parser": "^7.6.0",
|
|
106
106
|
"screwdriver-coverage-bookend": "^1.0.3",
|
|
107
107
|
"screwdriver-coverage-sonar": "^3.4.0",
|
|
108
|
-
"screwdriver-data-schema": "^21.
|
|
108
|
+
"screwdriver-data-schema": "^21.27.0",
|
|
109
109
|
"screwdriver-datastore-sequelize": "^7.2.7",
|
|
110
110
|
"screwdriver-executor-base": "^8.4.0",
|
|
111
111
|
"screwdriver-executor-docker": "^5.0.1",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"screwdriver-executor-queue": "^3.1.2",
|
|
115
115
|
"screwdriver-executor-router": "^2.3.0",
|
|
116
116
|
"screwdriver-logger": "^1.1.0",
|
|
117
|
-
"screwdriver-models": "^28.
|
|
117
|
+
"screwdriver-models": "^28.18.0",
|
|
118
118
|
"screwdriver-notifications-email": "^2.2.0",
|
|
119
119
|
"screwdriver-notifications-slack": "^3.2.1",
|
|
120
120
|
"screwdriver-request": "^1.0.3",
|
package/plugins/events/create.js
CHANGED
|
@@ -117,6 +117,8 @@ module.exports = () => ({
|
|
|
117
117
|
|
|
118
118
|
if (!pipeline) {
|
|
119
119
|
throw boom.notFound();
|
|
120
|
+
} else if (pipeline.state === 'INACTIVE') {
|
|
121
|
+
throw boom.badRequest('Cannot create an event for an inactive pipeline');
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
payload.scmContext = pipeline.scmContext;
|
|
@@ -29,10 +29,10 @@ module.exports = () => ({
|
|
|
29
29
|
if (!pipeline) {
|
|
30
30
|
throw boom.notFound('Pipeline does not exist');
|
|
31
31
|
}
|
|
32
|
-
if (pipeline.configPipelineId) {
|
|
32
|
+
if (pipeline.configPipelineId && pipeline.state !== 'INACTIVE') {
|
|
33
33
|
throw boom.forbidden(
|
|
34
34
|
'Child pipeline can only be removed' +
|
|
35
|
-
`
|
|
35
|
+
` after removing it from scmUrls in config pipeline ${pipeline.configPipelineId}`
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
38
|
if (!user) {
|
|
@@ -302,8 +302,18 @@ async function triggeredPipelines(
|
|
|
302
302
|
const splitUri = scmUri.split(':');
|
|
303
303
|
const scmBranch = `${splitUri[0]}:${splitUri[1]}:${splitUri[2]}`;
|
|
304
304
|
const scmRepoId = `${splitUri[0]}:${splitUri[1]}`;
|
|
305
|
-
const listConfig = {
|
|
306
|
-
|
|
305
|
+
const listConfig = {
|
|
306
|
+
search: { field: 'scmUri', keyword: `${scmRepoId}:%` },
|
|
307
|
+
params: {
|
|
308
|
+
state: 'ACTIVE'
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
const externalRepoSearchConfig = {
|
|
312
|
+
search: { field: 'subscribedScmUrlsWithActions', keyword: `%${scmRepoId}:%` },
|
|
313
|
+
params: {
|
|
314
|
+
state: 'ACTIVE'
|
|
315
|
+
}
|
|
316
|
+
};
|
|
307
317
|
|
|
308
318
|
const pipelines = await pipelineFactory.list(listConfig);
|
|
309
319
|
|