Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix driver detection #1209

Merged
merged 4 commits into from
Oct 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions bin/cml/runner/launch.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,16 +338,8 @@ const run = async (opts) => {
process.on(signal, () => shutdown({ ...opts, reason: signal }));
});

const {
driver,
workdir,
cloud,
labels,
name,
reuse,
reuseIdle,
dockerVolumes
} = opts;
const { workdir, cloud, labels, name, reuse, reuseIdle, dockerVolumes } =
opts;

await cml.repoTokenCheck();

Expand Down Expand Up @@ -375,7 +367,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'
);
Expand All @@ -396,7 +388,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.'
);
Expand Down