File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed
interface/cli/commands/pipeline/dynamic Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ const install = new Command({
57
57
description : 'Contexts (yaml || secret-yaml) to be passed to the install' ,
58
58
array : true ,
59
59
} )
60
+ . option ( 'set' , {
61
+ description : 'set of KEY=VALUE to be passed to the install' ,
62
+ array : true ,
63
+ } )
60
64
. option ( 'detach' , {
61
65
alias : 'd' ,
62
66
describe : 'Run pipeline and print build ID' ,
@@ -76,6 +80,7 @@ const install = new Command({
76
80
version : argv . version ,
77
81
values : argv . context ,
78
82
tillerNamespace : argv . tillerNamespace ,
83
+ setValues : argv . set ,
79
84
} ) ;
80
85
if ( argv . detach ) {
81
86
console . log ( workflowId ) ;
Original file line number Diff line number Diff line change @@ -37,6 +37,23 @@ const _normalizeValues = async (values = []) => {
37
37
return normalizedValues ;
38
38
} ;
39
39
40
+ const _normalizeSetValues = async ( values = [ ] ) => {
41
+ const normalizedValues = await Promise . reduce ( values , async ( normalized , givenValue ) => {
42
+ const [ key , value ] = givenValue . split ( '=' ) ;
43
+ if ( ! key || ! value ) {
44
+ throw new Error ( 'Passed set value must be in format KEY=VALUE' ) ;
45
+ }
46
+ const setObject = {
47
+ key,
48
+ value,
49
+ } ;
50
+ normalized . push ( setObject ) ;
51
+ return normalized ;
52
+ } , [ ] ) ;
53
+
54
+ return normalizedValues ;
55
+ } ;
56
+
40
57
const installChart = async ( {
41
58
cluster,
42
59
namespace,
@@ -46,8 +63,10 @@ const installChart = async ({
46
63
values,
47
64
releaseName,
48
65
tillerNamespace,
66
+ setValues,
49
67
} ) => {
50
68
const normalizedValues = await _normalizeValues ( values ) ;
69
+ const normalizedSetValues = await _normalizeSetValues ( setValues ) ;
51
70
const options = {
52
71
url : '/api/kubernetes/chart/install' ,
53
72
method : 'POST' ,
@@ -62,6 +81,7 @@ const installChart = async ({
62
81
values : normalizedValues ,
63
82
version,
64
83
releaseName,
84
+ set : normalizedSetValues ,
65
85
} ,
66
86
} ;
67
87
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " codefresh" ,
3
- "version" : " 0.8.2 " ,
3
+ "version" : " 0.8.3 " ,
4
4
"description" : " Codefresh command line utility" ,
5
5
"main" : " index.js" ,
6
6
"preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments