Skip to content

Commit

Permalink
fixed re env vars not set and storage class name not set using values… (
Browse files Browse the repository at this point in the history
#610)

* fixed re env vars not set and storage class name not set using values file
  • Loading branch information
roi-codefresh committed Dec 17, 2020
1 parent cdbf0fd commit 512ccd5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions lib/interface/cli/commands/hybrid/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,9 @@ function mergeValuesFromValuesFile(argv, valuesFile, handleError) {
if (_.has(valuesObj, 'Runtime.userVolumes')) {
_.set(_argv, 'userVolumes', valuesObj.Runtime.userVolumes);
}
if (!_.has(_argv, 'storage-class-name') && _.has(valuesObj, 'StorageClass')) {
_.set(_argv, 'storage-class-name', valuesObj.StorageClass);
}

return _argv;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/interface/cli/commands/hybrid/init.cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ const initCmd = new Command({
const re = await sdk.runtimeEnvs.get({ name: reName });

// update re env vars
if (envVars.length) {
if (envVars.length || reEnvVars) {
const envVarsObj = _.merge(keyValueArrayToObject(envVars), reEnvVars);

const currentEngineEnvVars = _.get(re, 'runtimeScheduler.envVars', {});
Expand Down Expand Up @@ -604,7 +604,7 @@ const initCmd = new Command({
await sdk.runtimeEnvs.update({ name: reName }, re);
console.log(`Runtime environment "${colors.cyan(reName)}" has been updated with env vars`);
},
condition: envVars.length || reResources || userVolumeMounts || userVolumes,
condition: envVars.length || reResources || userVolumeMounts || userVolumes || reEnvVars,
});

// set runtime as default
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codefresh",
"version": "0.73.33",
"version": "0.73.34",
"description": "Codefresh command line utility",
"main": "index.js",
"preferGlobal": true,
Expand Down

0 comments on commit 512ccd5

Please sign in to comment.