Skip to content

Commit

Permalink
Merge branch 'master' into users/nidabas/removePublishMetadataVar
Browse files Browse the repository at this point in the history
  • Loading branch information
dabasnidhi authored Nov 15, 2019
2 parents 513c3e8 + 2ea5a70 commit 00ac524
Show file tree
Hide file tree
Showing 30 changed files with 57 additions and 1,759 deletions.
18 changes: 12 additions & 6 deletions Tasks/HelmInstallerV0/src/helmtoolinstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import * as helminstaller from "./helminstaller"

tl.setResourcePath(path.join(__dirname, '..', 'task.json'));

var helmVersion = ""

async function configureKubectl() {
var version = await kubectlinstaller.getKuberctlVersion();
var kubectlPath = await kubectlinstaller.downloadKubectl(version);
Expand All @@ -21,8 +23,8 @@ async function configureKubectl() {
}

async function configureHelm() {
var version = await helminstaller.getHelmVersion();
var helmPath = await helminstaller.downloadHelm(version);
helmVersion = await helminstaller.getHelmVersion();
var helmPath = await helminstaller.downloadHelm(helmVersion);

// prepend the tools path. instructs the agent to prepend for future tasks
if (!process.env['PATH'].startsWith(path.dirname(helmPath))) {
Expand All @@ -33,10 +35,14 @@ async function configureHelm() {
async function verifyHelm() {
console.log(tl.loc("VerifyHelmInstallation"));
var helmToolPath = tl.which("helm", true);
var helmTool = tl.tool(helmToolPath);
helmTool.arg("init");
helmTool.arg("--client-only");
return helmTool.exec()

// Check if using Helm 2 or Helm 3
if (helmVersion.startsWith("v2")) {
var helmTool = tl.tool(helmToolPath);
helmTool.arg("init");
helmTool.arg("--client-only");
return helmTool.exec()
}
}

configureHelm()
Expand Down
2 changes: 1 addition & 1 deletion Tasks/HelmInstallerV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 159,
"Minor": 161,
"Patch": 0
},
"demands": [],
Expand Down
2 changes: 1 addition & 1 deletion Tasks/HelmInstallerV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 159,
"Minor": 161,
"Patch": 0
},
"demands": [],
Expand Down
15 changes: 6 additions & 9 deletions Tasks/HelmInstallerV1/src/helmtoolinstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import utils = require("./utils");

tl.setResourcePath(path.join(__dirname, '..', 'task.json'));

var version = ""

async function configureHelm() {
var version = await utils.getHelmVersion();
version = await utils.getHelmVersion();
var helmPath = await utils.downloadHelm(version);
// prepend the tools path. instructs the agent to prepend for future tasks
if (!process.env['PATH'].startsWith(path.dirname(helmPath))) {
Expand All @@ -19,19 +20,15 @@ async function configureHelm() {

async function verifyHelm() {
console.log(tl.loc("VerifyHelmInstallation"));
var helmVersion = await utils.getHelmVersion();
var helmToolPath = tl.which("helm", true);
var helmTool = tl.tool(helmToolPath);


// Check if using Helm 2 or Helm 3
if (helmVersion.startsWith("2")) {
if (version.startsWith("v2")) {
var helmTool = tl.tool(helmToolPath);
helmTool.arg("init");
helmTool.arg("--client-only");
} else {
helmTool.arg("version");
return helmTool.exec()
}

return helmTool.exec()
}

configureHelm()
Expand Down
4 changes: 2 additions & 2 deletions Tasks/HelmInstallerV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 160,
"Patch": 1
"Minor": 161,
"Patch": 0
},
"preview": true,
"demands": [],
Expand Down
6 changes: 3 additions & 3 deletions Tasks/HelmInstallerV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 160,
"Patch": 1
"Minor": 161,
"Patch": 0
},
"preview": true,
"demands": [],
Expand All @@ -41,4 +41,4 @@
"NotAValidSemverVersion": "ms-resource:loc.messages.NotAValidSemverVersion",
"VerifyHelmInstallation": "ms-resource:loc.messages.VerifyHelmInstallation"
}
}
}
76 changes: 0 additions & 76 deletions Tasks/RunDistributedTestsV1/CheckTestAgentCompat.ps1

This file was deleted.

123 changes: 0 additions & 123 deletions Tasks/RunDistributedTestsV1/README.md

This file was deleted.

Loading

0 comments on commit 00ac524

Please sign in to comment.