File tree Expand file tree Collapse file tree 10 files changed +34
-19
lines changed Expand file tree Collapse file tree 10 files changed +34
-19
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,12 @@ async function run() {
8484 var kubectlCli : kubernetescli ;
8585 var externalAuth = connectionType === "None" && ( command === "install" || command === "upgrade" ) ;
8686 if ( externalAuth && ! tl . getVariable ( "KUBECONFIG" ) ) {
87- tl . error ( "KUBECONFIG kube configuration file path must be set when connectionType is none and command is install or upgrade." ) ;
87+ const kubeConfigPath = path . join ( process . env . HOME , '.kube' , 'config' ) ;
88+ if ( fs . existsSync ( kubeConfigPath ) ) {
89+ tl . setVariable ( "KUBECONFIG" , kubeConfigPath ) ;
90+ } else {
91+ tl . error ( "KUBECONFIG kube configuration file path must be set when connectionType is none and command is install or upgrade." ) ;
92+ }
8893 }
8994 if ( isKubConfigRequired || externalAuth ) {
9095 var kubeconfigfilePath = ( command === "logout" || externalAuth ) ? tl . getVariable ( "KUBECONFIG" ) : await getKubeConfigFile ( ) ;
Original file line number Diff line number Diff line change 1414 "version" : {
1515 "Major" : 0 ,
1616 "Minor" : 226 ,
17- "Patch" : 7
17+ "Patch" : 9
1818 },
1919 "demands" : [],
2020 "groups" : [
Original file line number Diff line number Diff line change 1414 "version" : {
1515 "Major" : 0 ,
1616 "Minor" : 226 ,
17- "Patch" : 7
17+ "Patch" : 9
1818 },
1919 "demands" : [],
2020 "groups" : [
Original file line number Diff line number Diff line change 1- Default|0.226.7
2- Node16-225|0.226.6
1+ Default|0.226.9
2+ Node16-225|0.226.8
Original file line number Diff line number Diff line change @@ -84,7 +84,12 @@ async function run() {
8484 var kubectlCli : kubernetescli ;
8585 var externalAuth = connectionType === "None" && ( command === "install" || command === "upgrade" ) ;
8686 if ( externalAuth && ! tl . getVariable ( "KUBECONFIG" ) ) {
87- tl . error ( "KUBECONFIG kube configuration file path must be set when connectionType is none and command is install or upgrade." ) ;
87+ const kubeConfigPath = path . join ( process . env . HOME , '.kube' , 'config' ) ;
88+ if ( fs . existsSync ( kubeConfigPath ) ) {
89+ tl . setVariable ( "KUBECONFIG" , kubeConfigPath ) ;
90+ } else {
91+ tl . error ( "KUBECONFIG kube configuration file path must be set when connectionType is none and command is install or upgrade." ) ;
92+ }
8893 }
8994 if ( isKubConfigRequired || externalAuth ) {
9095 var kubeconfigfilePath = ( command === "logout" || externalAuth ) ? tl . getVariable ( "KUBECONFIG" ) : await getKubeConfigFile ( ) ;
Original file line number Diff line number Diff line change 1414 "version" : {
1515 "Major" : 0 ,
1616 "Minor" : 226 ,
17- "Patch" : 7
17+ "Patch" : 9
1818 },
1919 "demands" : [],
2020 "groups" : [
549549 "KubeloginFailed" : " Kubelogin authentication failed. Exception: %s"
550550 },
551551 "_buildConfigMapping" : {
552- "Default" : " 0.226.7 " ,
553- "Node16-225" : " 0.226.6 "
552+ "Default" : " 0.226.9 " ,
553+ "Node16-225" : " 0.226.8 "
554554 }
555555}
Original file line number Diff line number Diff line change 1414 "version" : {
1515 "Major" : 0 ,
1616 "Minor" : 226 ,
17- "Patch" : 7
17+ "Patch" : 9
1818 },
1919 "demands" : [],
2020 "groups" : [
549549 "KubeloginFailed" : " ms-resource:loc.messages.KubeloginFailed"
550550 },
551551 "_buildConfigMapping" : {
552- "Default" : " 0.226.7 " ,
553- "Node16-225" : " 0.226.6 "
552+ "Default" : " 0.226.9 " ,
553+ "Node16-225" : " 0.226.8 "
554554 }
555555}
Original file line number Diff line number Diff line change @@ -84,7 +84,12 @@ async function run() {
8484 var kubectlCli : kubernetescli ;
8585 var externalAuth = connectionType === "None" && ( command === "install" || command === "upgrade" ) ;
8686 if ( externalAuth && ! tl . getVariable ( "KUBECONFIG" ) ) {
87- tl . error ( "KUBECONFIG kube configuration file path must be set when connectionType is none and command is install or upgrade." ) ;
87+ const kubeConfigPath = path . join ( process . env . HOME , '.kube' , 'config' ) ;
88+ if ( fs . existsSync ( kubeConfigPath ) ) {
89+ tl . setVariable ( "KUBECONFIG" , kubeConfigPath ) ;
90+ } else {
91+ tl . error ( "KUBECONFIG kube configuration file path must be set when connectionType is none and command is install or upgrade." ) ;
92+ }
8893 }
8994 if ( isKubConfigRequired || externalAuth ) {
9095 var kubeconfigfilePath = ( command === "logout" || externalAuth ) ? tl . getVariable ( "KUBECONFIG" ) : await getKubeConfigFile ( ) ;
Original file line number Diff line number Diff line change 1414 "version" : {
1515 "Major" : 0 ,
1616 "Minor" : 226 ,
17- "Patch" : 6
17+ "Patch" : 8
1818 },
1919 "demands" : [],
2020 "groups" : [
561561 "KubeloginFailed" : " Kubelogin authentication failed. Exception: %s"
562562 },
563563 "_buildConfigMapping" : {
564- "Default" : " 0.226.7 " ,
565- "Node16-225" : " 0.226.6 "
564+ "Default" : " 0.226.9 " ,
565+ "Node16-225" : " 0.226.8 "
566566 }
567567}
Original file line number Diff line number Diff line change 1414 "version" : {
1515 "Major" : 0 ,
1616 "Minor" : 226 ,
17- "Patch" : 6
17+ "Patch" : 8
1818 },
1919 "demands" : [],
2020 "groups" : [
561561 "KubeloginFailed" : " ms-resource:loc.messages.KubeloginFailed"
562562 },
563563 "_buildConfigMapping" : {
564- "Default" : " 0.226.7 " ,
565- "Node16-225" : " 0.226.6 "
564+ "Default" : " 0.226.9 " ,
565+ "Node16-225" : " 0.226.8 "
566566 }
567567}
You can’t perform that action at this time.
0 commit comments