screwdriver-api 4.1.188 → 4.1.192
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/bin/server
CHANGED
|
@@ -50,6 +50,9 @@ const notificationConfig = config.get('notifications');
|
|
|
50
50
|
// Multiple build cluster feature flag
|
|
51
51
|
const multiBuildClusterEnabled = convertToBool(config.get('multiBuildCluster').enabled);
|
|
52
52
|
|
|
53
|
+
// Unzip artifacts feature flag
|
|
54
|
+
const unzipArtifactsEnabled = convertToBool(config.get('unzipArtifacts').enabled);
|
|
55
|
+
|
|
53
56
|
// Queue Webhook feature flag
|
|
54
57
|
const queueWebhookEnabled = convertToBool(config.get('queueWebhook').enabled);
|
|
55
58
|
|
|
@@ -261,7 +264,8 @@ datastore.setup(datastoreConfig.ddlSyncEnabled).then(() =>
|
|
|
261
264
|
queueWebhook: {
|
|
262
265
|
executor,
|
|
263
266
|
queueWebhookEnabled
|
|
264
|
-
}
|
|
267
|
+
},
|
|
268
|
+
unzipArtifactsEnabled
|
|
265
269
|
})
|
|
266
270
|
.then(instance => logger.info('Server running at %s', instance.info.uri))
|
|
267
271
|
.catch(err => {
|
|
@@ -385,6 +385,10 @@ multiBuildCluster:
|
|
|
385
385
|
# Enabled multi build cluster feature or not
|
|
386
386
|
enabled: MULTI_BUILD_CLUSTER_ENABLED
|
|
387
387
|
|
|
388
|
+
unzipArtifacts:
|
|
389
|
+
# Enabled unzip artifacts feature or not
|
|
390
|
+
enabled: UNZIP_ARTIFACTS_ENABLED
|
|
391
|
+
|
|
388
392
|
ecosystem:
|
|
389
393
|
# URL for the User Interface
|
|
390
394
|
ui: ECOSYSTEM_UI
|
package/config/default.yaml
CHANGED
package/lib/server.js
CHANGED
|
@@ -79,6 +79,7 @@ function prettyPrintErrors(request, h) {
|
|
|
79
79
|
* @param {Object} config.builds.ecosystem List of hosts in the ecosystem
|
|
80
80
|
* @param {Object} config.builds.authConfig Configuration for auth
|
|
81
81
|
* @param {Object} config.builds.externalJoin Flag to allow external join
|
|
82
|
+
* @param {Object} config.unzipArtifactsEnabled Flag to allow unzip artifacts
|
|
82
83
|
* @param {Function} callback Callback to invoke when server has started.
|
|
83
84
|
* @return {http.Server} A listener: NodeJS http.Server object
|
|
84
85
|
*/
|
|
@@ -137,7 +138,10 @@ module.exports = async config => {
|
|
|
137
138
|
buildClusterFactory: config.buildClusterFactory,
|
|
138
139
|
ecosystem: config.ecosystem,
|
|
139
140
|
release: config.release,
|
|
140
|
-
queueWebhook: config.queueWebhook
|
|
141
|
+
queueWebhook: config.queueWebhook,
|
|
142
|
+
feature: {
|
|
143
|
+
unzipArtifacts: config.unzipArtifactsEnabled
|
|
144
|
+
}
|
|
141
145
|
};
|
|
142
146
|
|
|
143
147
|
const bellConfigs = await config.auth.scm.getBellConfiguration();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "screwdriver-api",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.192",
|
|
4
4
|
"description": "API server for the Screwdriver.cd service",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"screwdriver-scm-gitlab": "^2.7.2",
|
|
124
124
|
"screwdriver-scm-router": "^6.3.0",
|
|
125
125
|
"screwdriver-template-validator": "^5.2.0",
|
|
126
|
-
"screwdriver-workflow-parser": "^3.2.
|
|
126
|
+
"screwdriver-workflow-parser": "^3.2.1",
|
|
127
127
|
"sqlite3": "^5.0.1",
|
|
128
128
|
"stream": "0.0.2",
|
|
129
129
|
"tinytim": "^0.1.1",
|
|
@@ -18,6 +18,13 @@ module.exports = config => ({
|
|
|
18
18
|
},
|
|
19
19
|
|
|
20
20
|
handler: async (req, h) => {
|
|
21
|
+
if (!req.server.app.feature.unzipArtifacts) {
|
|
22
|
+
const data = {
|
|
23
|
+
statusCode: 200,
|
|
24
|
+
message: "This function is not enabled and will do nothing."
|
|
25
|
+
}
|
|
26
|
+
return h.response(data).code(200);
|
|
27
|
+
}
|
|
21
28
|
const buildId = req.params.id;
|
|
22
29
|
const { username, scope } = req.auth.credentials;
|
|
23
30
|
const isBuild = scope.includes('build');
|
package/plugins/builds/index.js
CHANGED
|
@@ -410,6 +410,11 @@ function parseJobInfo({ joinObj = {}, current, nextJobName, nextPipelineId }) {
|
|
|
410
410
|
* @return {Promise} All finished builds
|
|
411
411
|
*/
|
|
412
412
|
async function getFinishedBuilds(event, buildFactory) {
|
|
413
|
+
if (!event.parentEventId) {
|
|
414
|
+
// FIXME: remove this flow to always use buildFactory.getLatestBuilds
|
|
415
|
+
return event.getBuilds();
|
|
416
|
+
}
|
|
417
|
+
|
|
413
418
|
// FIXME: buildFactory.getLatestBuilds doesn't return build model
|
|
414
419
|
const builds = await buildFactory.getLatestBuilds({ groupEventId: event.groupEventId });
|
|
415
420
|
|