File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
lib/interface/cli/commands/runtimeEnvironments Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 3939 type : push
4040 candidate : ${{build_step}}
4141 tag : ${{CF_SHORT_REVISION}}
42- registry : " CFCR"
4342
4443 execute_release_pipeline :
4544 title : " Execute release pipeline in case version was changed"
Original file line number Diff line number Diff line change @@ -130,6 +130,19 @@ const installRuntimeCmd = new Command({
130130 throw new Error ( 'runtime-kube-namespace is mandatory parameter' ) ;
131131 }
132132
133+ // parse kubeNodeSelector in form key1=value1,key2=value2 to {key1: value1, key2: value2}
134+ let kubeNodeSelectorObj = { } ;
135+ if ( kubeNodeSelector ) {
136+ const nsSplitParts = kubeNodeSelector . split ( ',' ) ;
137+ nsSplitParts . forEach ( nsPart => {
138+ const nsRecordSplit = nsPart . split ( '=' ) ;
139+ if ( nsRecordSplit . length !== 2 ) {
140+ throw new Error ( 'invalid kube-node-selector parameter' ) ;
141+ }
142+ kubeNodeSelectorObj [ nsRecordSplit [ 0 ] ] = nsRecordSplit [ 1 ] ;
143+ } ) ;
144+ }
145+
133146 const apiHost = sdk . config . context . url ;
134147 if ( ! kubeContextName ) {
135148 kubeContextName = getKubeContext ( kubeConfigPath ) ;
@@ -147,7 +160,7 @@ const installRuntimeCmd = new Command({
147160 namespace : kubeNamespace ,
148161 storageClassName,
149162 runnerType : kubernetesRunnerType ,
150- nodeSelector : kubeNodeSelector ,
163+ nodeSelector : kubeNodeSelectorObj ,
151164 annotations : buildAnnotations ,
152165 clusterName,
153166 agent : true ,
Original file line number Diff line number Diff line change 11{
22 "name" : " codefresh" ,
3- "version" : " 0.50.3 " ,
3+ "version" : " 0.50.4 " ,
44 "description" : " Codefresh command line utility" ,
55 "main" : " index.js" ,
66 "preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments