Skip to content

Commit

Permalink
Not calling github APIs to validate version number (#9817)
Browse files Browse the repository at this point in the history
* not checking for valid version for kubectl tool

* bumping up kubernetes task version

* add v in front of version
  • Loading branch information
divman25 authored Mar 13, 2019
1 parent e3582f7 commit 695fc57
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
14 changes: 12 additions & 2 deletions Tasks/KubernetesV1/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,19 @@ export async function getKubectlVersion(versionSpec: string, checkLatest: boolea
tl.warning(tl.loc("UsingLatestStableVersion"));
return kubectlutility.getStableKubectlVersion();
}
else if ("v".concat(versionSpec) === kubectlutility.stableKubectlVersion) {
tl.debug(util.format("Using default versionSpec:%s.", versionSpec));
return kubectlutility.stableKubectlVersion;
}
else {
let versions = await kubectlutility.getAvailableKubectlVersions();
return sanitizeVersionString(versions, versionSpec);
// Do not check for validity of the version here,
// We'll return proper error message when the download fails
if(!versionSpec.startsWith("v")) {
return "v".concat(versionSpec);
}
else{
return versionSpec;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion Tasks/KubernetesV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 1,
"Minor": 1,
"Patch": 26
"Patch": 29
},
"demands": [],
"releaseNotes": "What's new in Version 1.0:<br/>&nbsp;Added new service connection type input for easy selection of Azure AKS cluster.<br/>&nbsp;Replaced output variable input with output variables section that we had added in all tasks.",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/KubernetesV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 1,
"Minor": 1,
"Patch": 26
"Patch": 29
},
"demands": [],
"releaseNotes": "ms-resource:loc.releaseNotes",
Expand Down

0 comments on commit 695fc57

Please sign in to comment.