File tree Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import * as helminstaller from "./helminstaller"
1010
1111tl . setResourcePath ( path . join ( __dirname , '..' , 'task.json' ) ) ;
1212
13- var versionToInstall = ""
13+ var helmVersion = ""
1414
1515async function configureKubectl ( ) {
1616 var version = await kubectlinstaller . getKuberctlVersion ( ) ;
@@ -23,9 +23,8 @@ async function configureKubectl() {
2323}
2424
2525async function configureHelm ( ) {
26- var version = await helminstaller . getHelmVersion ( ) ;
27- versionToInstall = version
28- var helmPath = await helminstaller . downloadHelm ( version ) ;
26+ helmVersion = await helminstaller . getHelmVersion ( ) ;
27+ var helmPath = await helminstaller . downloadHelm ( helmVersion ) ;
2928
3029 // prepend the tools path. instructs the agent to prepend for future tasks
3130 if ( ! process . env [ 'PATH' ] . startsWith ( path . dirname ( helmPath ) ) ) {
@@ -39,11 +38,9 @@ async function verifyHelm() {
3938 var helmTool = tl . tool ( helmToolPath ) ;
4039
4140 // Check if using Helm 2 or Helm 3
42- if ( versionToInstall . startsWith ( "v2" ) ) {
41+ if ( helmVersion . startsWith ( "v2" ) ) {
4342 helmTool . arg ( "init" ) ;
4443 helmTool . arg ( "--client-only" ) ;
45- } else {
46- helmTool . arg ( "version" ) ;
4744 }
4845
4946 return helmTool . exec ( )
Original file line number Diff line number Diff line change @@ -7,11 +7,10 @@ import utils = require("./utils");
77
88tl . setResourcePath ( path . join ( __dirname , '..' , 'task.json' ) ) ;
99
10- var versionToInstall = ""
10+ var version = ""
1111
1212async function configureHelm ( ) {
13- var version = await utils . getHelmVersion ( ) ;
14- versionToInstall = version ;
13+ version = await utils . getHelmVersion ( ) ;
1514 var helmPath = await utils . downloadHelm ( version ) ;
1615
1716 // prepend the tools path. instructs the agent to prepend for future tasks
@@ -26,13 +25,11 @@ async function verifyHelm() {
2625 var helmTool = tl . tool ( helmToolPath ) ;
2726
2827 // Check if using Helm 2 or Helm 3
29- if ( versionToInstall . startsWith ( "v2" ) ) {
28+ if ( version . startsWith ( "v2" ) ) {
3029 helmTool . arg ( "init" ) ;
3130 helmTool . arg ( "--client-only" ) ;
32- } else {
33- helmTool . arg ( "version" ) ;
3431 }
35-
32+
3633 return helmTool . exec ( )
3734}
3835
You can’t perform that action at this time.
0 commit comments