Skip to content

Commit 32f181a

Browse files
feat: default runtime environment for run command (#862)
1 parent df8345b commit 32f181a

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

lib/interface/cli/commands/pipeline/run.cf.js

+9
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ class RunExternalCommand extends RunBaseCommand {
3030
pipelineName,
3131
options,
3232
});
33+
try {
34+
if (options && options.runtimeName) {
35+
await sdk.runtimeEnvs.get({ name: options.runtimeName, extend: false });
36+
}
37+
} catch (error) {
38+
if (error.statusCode === 404) {
39+
console.warn(`Runtime environment ${options.runtimeName} not found. Default runtime will be used.`);
40+
}
41+
}
3342
this.workflowId = await sdk.pipelines[interfaceMethod]({ name: pipelineName }, _buildBody(options));
3443
if (this.executionRequests.length === 1) {
3544
if (this.argv.returnWorkflowId) {

lib/logic/entities/RuntimeEnvironments.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class RuntimeEnvironments extends Entity {
2222
return new RuntimeEnvironments(_.pick(response, [
2323
'version', 'metadata', 'environmentCertPath', 'runtimeScheduler',
2424
'dockerDaemonScheduler', 'history', 'extends', 'description', 'isPublic',
25-
'isDefault', 'accountId', 'plan', 'accounts', 'nonComplete', 'appProxy',
25+
'isDefault', 'accountId', 'plan', 'accounts', 'nonComplete', 'appProxy', 'tags',
2626
]));
2727
}
2828
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.87.5",
3+
"version": "0.87.6",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,
@@ -115,4 +115,4 @@
115115
"./test-setup.js"
116116
]
117117
}
118-
}
118+
}

0 commit comments

Comments
 (0)