File tree 5 files changed +24
-7
lines changed
5 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ module.exports = {
7
7
auto_compose : true ,
8
8
node : '16' ,
9
9
tester_flavour : 'chrome-tester' ,
10
- mirror : true ,
10
+ mirror : process . platform !== 'darwin' ,
11
11
services : [
12
12
'redisSentinel' ,
13
13
'redisCluster' ,
@@ -17,6 +17,8 @@ module.exports = {
17
17
'cassandra' ,
18
18
'couchdb' ,
19
19
] ,
20
+ mutagenVolumeExternal : true ,
21
+ mutagenVolumeName : 'mdep-src ' ,
20
22
in_one : true ,
21
23
extras : {
22
24
tester : {
Original file line number Diff line number Diff line change @@ -179,6 +179,16 @@ exports.builder = (yargs) => (
179
179
. option ( 'mutagen-working-dir' , {
180
180
describe : 'custom mutagen working dir' ,
181
181
} )
182
+ . option ( 'mutagen-volume-name' , {
183
+ describe : 'shared mutagen volume name' ,
184
+ type : 'string' ,
185
+ default : 'makeomatic-deploy-code' ,
186
+ } )
187
+ . option ( 'mutagen-volume-external' , {
188
+ describe : 'set as external to avoid recreating each time' ,
189
+ type : 'boolean' ,
190
+ default : false ,
191
+ } )
182
192
. option ( 'exec-user' , {
183
193
alias : 'euser' ,
184
194
describe : 'user to run setup commands with' ,
Original file line number Diff line number Diff line change @@ -44,7 +44,11 @@ exports.handler = async (argv) => {
44
44
}
45
45
46
46
if ( argv . isMutagen ) {
47
- compose . volumes [ 'makeomatic-deploy-code' ] = { } ;
47
+ compose . volumes [ argv . mutagenVolumeName ] = { } ;
48
+ if ( argv . mutagenVolumeExternal ) {
49
+ compose . volumes [ argv . mutagenVolumeName ] . name = argv . mutagenVolumeName ;
50
+ }
51
+
48
52
compose [ 'x-mutagen' ] = {
49
53
sync : {
50
54
defaults : {
@@ -53,7 +57,7 @@ exports.handler = async (argv) => {
53
57
} ,
54
58
code : {
55
59
alpha : argv . mutagenDir ,
56
- beta : ' volume://makeomatic-deploy-code' ,
60
+ beta : ` volume://${ argv . mutagenVolumeName } ` ,
57
61
} ,
58
62
} ,
59
63
} ;
@@ -113,7 +117,7 @@ async function tester(compose, argv) {
113
117
const volumes = testerConfig . volumes . filter ( ( volume ) => volume !== workingVolume ) ;
114
118
115
119
volumes . push (
116
- argv . isMutagen ? `makeomatic-deploy-code :${ mutagenWorkingDir } ` : workingVolume
120
+ argv . isMutagen ? `${ argv . mutagenVolumeName } :${ mutagenWorkingDir } ` : workingVolume
117
121
) ;
118
122
119
123
if ( argv . mirror ) {
Original file line number Diff line number Diff line change @@ -70,9 +70,10 @@ exports.handler = async (argv) => {
70
70
exec ( argv . on_fail ) ;
71
71
}
72
72
73
+ const cleanup = argv . mutagenVolumeExternal ? 'down' : 'down -v' ;
73
74
if ( argv . no_cleanup !== true ) {
74
75
echo ( `\nAutomatically cleaning up after ${ signal } \n` ) ;
75
- exec ( `${ dockerCompose } down -v --remove-orphans; true` ) ;
76
+ exec ( `${ dockerCompose } ${ cleanup } --remove-orphans; true` ) ;
76
77
77
78
if ( argv . auto_compose ) {
78
79
const deleteCmd = ( isWin ? 'del ' : 'rm ' ) + argv . docker_compose ;
@@ -83,7 +84,7 @@ exports.handler = async (argv) => {
83
84
// force exit now
84
85
if ( signal === 'exit' ) process . exit ( code || 0 ) ;
85
86
} else {
86
- echo ( `\nLocal environment detected.\nTo stop containers write:\n\n${ dockerCompose } down -v --remove-orphans;\n` ) ;
87
+ echo ( `\nLocal environment detected.\nTo stop containers write:\n\n${ dockerCompose } ${ cleanup } --remove-orphans;\n` ) ;
87
88
}
88
89
}
89
90
Original file line number Diff line number Diff line change 1
1
exports . coverageProvider = 'v8' ;
2
2
exports . testURL = 'http://tester.local' ;
3
3
exports . verbose = true ;
4
- exports . testTimeout = 15000 ;
4
+ exports . testTimeout = 60000 ;
You can’t perform that action at this time.
0 commit comments