Skip to content

Commit

Permalink
feat(deploy): extra docker compose (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
o-cappasity authored and AVVS committed Oct 3, 2019
1 parent f95254d commit 44e3f12
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 9 additions & 3 deletions bin/cmds/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ exports.builder = (yargs) => (
yargs
.commandDir('test_cmds')
.option('docker_compose', {
type: 'array',
describe: 'docker-compose files for testing',
default: ['./test/docker-compose.yml'],
describe: 'docker-compose file for testing',
default: './test/docker-compose.yml',
normalize: true,
})
.option('docker_compose_multi', {
alias: 'dcm',
describe: 'docker-compose files that will be started in provided order',
type: 'string',
array: true,
default: [],
})
.option('parallel', {
type: 'number',
description: 'run test suites in parallel',
Expand Down
6 changes: 5 additions & 1 deletion bin/cmds/test_cmds/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {
} = require('shelljs');

const isWin = process.platform === 'win32';
const withComposeFile = (filepaths) => `-f ${filepaths.join(' -f ')}`;
const withComposeFile = (filepath) => `-f ${filepath}`;

exports.command = 'compose';
exports.desc = 'installs compose on the system';
Expand Down Expand Up @@ -62,6 +62,10 @@ exports.handler = (argv) => {
}
}

if (argv.docker_compose_multi.length > 0) {
dockerComposeFiles = `-f ${argv.docker_compose_multi.join(' -f ')}`;
}

// add link to compose file
argv.compose = ShellString(`"${compose}" ${dockerComposeFiles}`);

Expand Down

0 comments on commit 44e3f12

Please sign in to comment.