Skip to content

Commit cbc4ba6

Browse files
authored
Remove docker machine (#1011)
1 parent 5409c8f commit cbc4ba6

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

bin/cml/runner.js

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const kebabcaseKeys = require('kebabcase-keys');
66
const timestring = require('timestring');
77
const winston = require('winston');
88
const CML = require('../../src/cml').default;
9-
const { exec, randid, sleep } = require('../../src/utils');
9+
const { randid, sleep } = require('../../src/utils');
1010
const tf = require('../../src/terraform');
1111

1212
let cml;
@@ -27,8 +27,7 @@ const shutdown = async (opts) => {
2727
tfResource,
2828
noRetry,
2929
reason,
30-
destroyDelay,
31-
dockerMachine
30+
destroyDelay
3231
} = opts;
3332
const tfPath = workdir;
3433

@@ -66,20 +65,6 @@ const shutdown = async (opts) => {
6665
}
6766
};
6867

69-
const destroyDockerMachine = async () => {
70-
if (!dockerMachine) return;
71-
72-
winston.info('docker-machine destroy...');
73-
winston.warning(
74-
'Docker machine is deprecated and will be removed!! Check how to deploy using our tf provider.'
75-
);
76-
try {
77-
await exec(`echo y | docker-machine rm ${dockerMachine}`);
78-
} catch (err) {
79-
winston.error(`\tFailed shutting down docker machine: ${err.message}`);
80-
}
81-
};
82-
8368
const destroyTerraform = async () => {
8469
if (!tfResource) return;
8570

@@ -106,8 +91,6 @@ const shutdown = async (opts) => {
10691
} catch (err) {
10792
winston.error(`Error connecting the SCM: ${err.message}`);
10893
}
109-
110-
await destroyDockerMachine();
11194
}
11295

11396
await destroyTerraform();
@@ -596,11 +579,6 @@ exports.builder = (yargs) =>
596579
description:
597580
'Seconds to wait for collecting logs on failure (https://github.com/iterative/cml/issues/413)'
598581
},
599-
dockerMachine: {
600-
type: 'string',
601-
hidden: true,
602-
description: 'Legacy docker-machine environment variable'
603-
},
604582
workdir: {
605583
type: 'string',
606584
hidden: true,

0 commit comments

Comments
 (0)