Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions bin/cml/ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ exports.description = 'Fixes specific CI setups';

exports.handler = async (opts) => {
const cml = new CML(opts);
await cml.init();
console.log((await cml.ci(opts)) || '');
};

Expand Down
1 change: 1 addition & 0 deletions bin/cml/pr.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ exports.description = 'Create a pull request with the specified files';

exports.handler = async (opts) => {
const cml = new CML(opts);
await cml.init();
const link = await cml.prCreate({ ...opts, globs: opts.globpath });
if (link) console.log(link);
};
Expand Down
2 changes: 1 addition & 1 deletion bin/cml/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports.handler = async (opts) => {

const path = opts.asset;
const cml = new CML({ ...opts, repo: native ? repo : 'cml' });

await cml.init();
const output = await cml.publish({
...opts,
path
Expand Down
1 change: 1 addition & 0 deletions bin/cml/rerun-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports.description = 'Reruns a workflow given the jobId or workflow Id';

exports.handler = async (opts) => {
const cml = new CML(opts);
await cml.init();
await cml.pipelineRerun(opts);
};

Expand Down
1 change: 1 addition & 0 deletions bin/cml/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ const run = async (opts) => {

cml = new CML({ driver, repo, token });

await cml.init();
await cml.repoTokenCheck();

if (dockerVolumes.length && cml.driver !== 'gitlab')
Expand Down
1 change: 1 addition & 0 deletions bin/cml/runner.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const testRunner = async (opts) => {

const sshOpts = { host, username: 'ubuntu', privateKey };
const cml = new CML({ repo, token });
await cml.init();

let runner = await cml.runnerByName({ name });
expect(runner).not.toBe(undefined);
Expand Down
1 change: 1 addition & 0 deletions bin/cml/send-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ exports.handler = async (opts) => {
const path = opts.markdownfile;
const report = await fs.readFile(path, 'utf-8');
const cml = new CML(opts);
await cml.init();
console.log(await cml.commentCreate({ ...opts, report }));
};

Expand Down
1 change: 1 addition & 0 deletions bin/cml/send-github-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ exports.handler = async (opts) => {
const path = opts.markdownfile;
const report = await fs.readFile(path, 'utf-8');
const cml = new CML({ ...opts });
await cml.init();
await cml.checkCreate({ ...opts, report });
};

Expand Down
Loading