From a5996ce1a0e401237f9bf47309a0a3961983d1ca Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 7 Oct 2022 09:37:46 +0100 Subject: [PATCH 1/3] fix driver detection - fixes #1066 --- bin/cml/runner/launch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cml/runner/launch.js b/bin/cml/runner/launch.js index 669db00b2..d3ddc8ffb 100755 --- a/bin/cml/runner/launch.js +++ b/bin/cml/runner/launch.js @@ -375,7 +375,7 @@ const run = async (opts) => { } if (reuseIdle) { - if (driver === 'bitbucket') { + if (cml.driver === 'bitbucket') { throw new Error( 'cml runner flag --reuse-idle is unsupported by bitbucket' ); @@ -396,7 +396,7 @@ const run = async (opts) => { if (dockerVolumes.length && cml.driver !== 'gitlab') winston.warn('Parameters --docker-volumes is only supported in gitlab'); - if (driver === 'github') + if (cml.driver === 'github') winston.warn( 'Github Actions timeout has been updated from 72h to 35 days. Update your workflow accordingly to be able to restart it automatically.' ); From 7467d12c46561efbbf939897f658500593edfcc7 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Fri, 7 Oct 2022 11:49:55 +0100 Subject: [PATCH 2/3] remove unneeded variable --- bin/cml/runner/launch.js | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/cml/runner/launch.js b/bin/cml/runner/launch.js index d3ddc8ffb..86caf8be5 100755 --- a/bin/cml/runner/launch.js +++ b/bin/cml/runner/launch.js @@ -339,7 +339,6 @@ const run = async (opts) => { }); const { - driver, workdir, cloud, labels, From 104e73ebeb6e86a53c1c9682cea3642ca4af4f94 Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Mon, 10 Oct 2022 05:18:05 +0200 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/cml/runner/launch.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/bin/cml/runner/launch.js b/bin/cml/runner/launch.js index 86caf8be5..8b568db12 100755 --- a/bin/cml/runner/launch.js +++ b/bin/cml/runner/launch.js @@ -338,15 +338,8 @@ const run = async (opts) => { process.on(signal, () => shutdown({ ...opts, reason: signal })); }); - const { - workdir, - cloud, - labels, - name, - reuse, - reuseIdle, - dockerVolumes - } = opts; + const { workdir, cloud, labels, name, reuse, reuseIdle, dockerVolumes } = + opts; await cml.repoTokenCheck();