Skip to content

Commit cca1878

Browse files
Itai GendlerItai Gendler
Itai Gendler
authored and
Itai Gendler
committed
Update ability to run both pipeline V1 and V2
1 parent 4d93662 commit cca1878

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

lib/interface/cli/commands/workflow/run.cmd.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ const run = new Command({
107107

108108
_.forEach(executionRequests, async ({ pipelineId, options }) => {
109109
let workflowId;
110-
if (authManager.getCurrentContext()
111-
.isBetaFeatEnabled()) {
110+
if (!ObjectID.isValid(pipelineId)) {
112111
workflowId = await pipeline2.runPipelineByName(pipelineId, options);
113112
} else {
114113
workflowId = await pipeline.runPipelineById(pipelineId, options);

lib/logic/api/pipeline2.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,12 @@ const deletePipelineByName = async (name) => {
5555
};
5656

5757
const runPipelineByName = async (name, data) => {
58-
5958
const body = _.pick(data, 'variables', 'branch');
6059

6160
const options = {
6261
url: `/api/pipelines/new/run/${name}`,
6362
method: 'POST',
64-
body
63+
body,
6564
};
6665

6766
return sendHttpRequest(options);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.6.5",
3+
"version": "0.6.6",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)