screwdriver-api 7.0.224 → 7.0.225
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 +3 -1
- package/lib/server.js +2 -2
- package/package.json +1 -1
package/bin/server
CHANGED
|
@@ -62,6 +62,7 @@ const queueWebhookEnabled = convertToBool(config.get('queueWebhook').enabled);
|
|
|
62
62
|
// Default cluster environment variable
|
|
63
63
|
const clusterEnvConfig = config.get('build').environment; // readonly
|
|
64
64
|
const clusterEnv = { ...clusterEnvConfig };
|
|
65
|
+
const artifactsMaxDownloadSize = config.get('build').artifacts.maxDownloadSize;
|
|
65
66
|
|
|
66
67
|
Object.keys(clusterEnv).forEach(k => {
|
|
67
68
|
clusterEnv[k] = String(clusterEnv[k]);
|
|
@@ -304,7 +305,8 @@ datastore.setup(datastoreConfig.ddlSyncEnabled).then(() =>
|
|
|
304
305
|
executor,
|
|
305
306
|
queueWebhookEnabled
|
|
306
307
|
},
|
|
307
|
-
unzipArtifactsEnabled
|
|
308
|
+
unzipArtifactsEnabled,
|
|
309
|
+
artifactsMaxDownloadSize
|
|
308
310
|
})
|
|
309
311
|
.then(instance => logger.info('Server running at %s', instance.info.uri))
|
|
310
312
|
.catch(err => {
|
package/lib/server.js
CHANGED
|
@@ -82,6 +82,7 @@ function prettyPrintErrors(request, h) {
|
|
|
82
82
|
* @param {Object} config.builds.authConfig Configuration for auth
|
|
83
83
|
* @param {Object} config.builds.externalJoin Flag to allow external join
|
|
84
84
|
* @param {Object} config.unzipArtifactsEnabled Flag to allow unzip artifacts
|
|
85
|
+
* @param {Object} config.artifactsMaxDownloadSize Maximum download size for artifacts
|
|
85
86
|
* @param {Function} callback Callback to invoke when server has started.
|
|
86
87
|
* @return {http.Server} A listener: NodeJS http.Server object
|
|
87
88
|
*/
|
|
@@ -211,8 +212,7 @@ module.exports = async config => {
|
|
|
211
212
|
expiresIn
|
|
212
213
|
);
|
|
213
214
|
server.app.buildFactory.executor.tokenGen = server.app.buildFactory.tokenGen;
|
|
214
|
-
server.app.buildFactory.maxDownloadSize =
|
|
215
|
-
parseInt(config.build.artifacts.maxDownloadSize, 10) * 1024 * 1024 * 1024;
|
|
215
|
+
server.app.buildFactory.maxDownloadSize = parseInt(config.artifactsMaxDownloadSize, 10) * 1024 * 1024 * 1024;
|
|
216
216
|
|
|
217
217
|
server.app.jobFactory.apiUri = server.info.uri;
|
|
218
218
|
server.app.jobFactory.tokenGen = (username, metadata, scmContext, scope = ['user']) =>
|