Skip to content

Commit 9d79839

Browse files
fixing run locally does not work with new engine (#786)
1 parent 7f83f13 commit 9d79839

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ class RunLocalCommand extends RunBaseCommand {
110110
injectedOpts.Env.push(`TRIGGER=${trigger}`);
111111
}
112112

113+
if (branch) {
114+
injectedOpts.Env.push(`BRANCH=${branch}`);
115+
}
116+
113117
const currentContext = sdk.config.context;
114118
console.log(`Running pipeline: ${pipelineName}`);
115119

@@ -119,7 +123,6 @@ class RunLocalCommand extends RunBaseCommand {
119123
...(debug ? ['PIPELINE_DEBUG_MODE=true'] : []),
120124
`ACCESS_TOKEN=${currentContext.token}`,
121125
`PIPELINE_ID=${pipelineName}`,
122-
`BRANCH=${branch}`,
123126
`CF_HOST=${currentContext.url}`,
124127
'DOCKER_SOCKET_PATH=/var/run/docker.sock',
125128
];
@@ -131,6 +134,7 @@ class RunLocalCommand extends RunBaseCommand {
131134
'/var/run/docker.sock:/var/run/docker.sock',
132135
],
133136
},
137+
User: '0:0',
134138
}, injectedOpts, _customizer), (err, data) => {
135139
if (err) {
136140
console.log(chalk.red(`Error when running pipeline : ${err}`));

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.81.7",
3+
"version": "0.81.8",
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)