Skip to content

Commit ff86ec8

Browse files
authored
Fix output variable length issue - KubernetesV1 (#11525)
1 parent 058094f commit ff86ec8

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Tasks/KubernetesV1/src/kubernetes.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,12 @@ function executeKubectlCommand(clusterConnection: ClusterConnection, command: st
107107
return commandImplementation.run(clusterConnection, command, (data) => result.push(data))
108108
.fin(function cleanup() {
109109
console.log("commandOutput" + result);
110-
var commandOutputLength = result.length;
110+
const resultString = result.toString();
111+
const commandOutputLength = resultString.length;
111112
if (commandOutputLength > environmentVariableMaximumSize) {
112113
tl.warning(tl.loc("OutputVariableDataSizeExceeded", commandOutputLength, environmentVariableMaximumSize));
113114
} else {
114-
tl.setVariable('KubectlOutput', result.toString());
115+
tl.setVariable('KubectlOutput', resultString);
115116
}
116117

117118
const outputFormat: string = tl.getInput("outputFormat", false);

Tasks/KubernetesV1/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 1,
1616
"Minor": 158,
17-
"Patch": 1
17+
"Patch": 2
1818
},
1919
"demands": [],
2020
"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.",

Tasks/KubernetesV1/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 1,
1616
"Minor": 158,
17-
"Patch": 1
17+
"Patch": 2
1818
},
1919
"demands": [],
2020
"releaseNotes": "ms-resource:loc.releaseNotes",

0 commit comments

Comments
 (0)