diff --git a/server/src/routes/api/api.js b/server/src/routes/api/api.js index 4c16716..d3c2892 100644 --- a/server/src/routes/api/api.js +++ b/server/src/routes/api/api.js @@ -181,6 +181,7 @@ api.post( let scriptingName = userConfig.api.scriptingName; let label = userConfig.api.label; let priority = userConfig.api.priority; + let container = userConfig.api.dockerContainer; const location = userConfig.api.location; @@ -196,7 +197,8 @@ api.post( scriptingName, label, testType, - priority + priority, + container ); response.json({ id }); } catch (error) { diff --git a/server/src/util/add-test.js b/server/src/util/add-test.js index 2a23253..251f42f 100644 --- a/server/src/util/add-test.js +++ b/server/src/util/add-test.js @@ -177,7 +177,8 @@ export async function addTestFromAPI( scriptingName, label, testType, - priority + priority, + dockerContainer ) { // The number of objects to keep in the queue before removal const removeOnComplete = nconf.get('queue:removeOnComplete') || 200; @@ -233,7 +234,8 @@ export async function addTestFromAPI( config, scripting, scriptingName, - label + label, + dockerContainer }, jobConfig ); diff --git a/testrunner/src/testrunners/docker-testrunner.js b/testrunner/src/testrunners/docker-testrunner.js index db34eea..bfc963e 100644 --- a/testrunner/src/testrunners/docker-testrunner.js +++ b/testrunner/src/testrunners/docker-testrunner.js @@ -30,7 +30,8 @@ export default async function runJob(job) { try { logger.info(`Start with job ${job.id}`); const baseWorkingDirectory = os.tmpdir(); - const dockerContainer = nconf.get('docker:container'); + const dockerContainer = + job.data.dockerContainer || nconf.get('docker:container'); const dockerExtraParameters = parseDockerExtraParameters( nconf.get('docker:extraparameters')