Skip to content

Commit 8ac8573

Browse files
Resolve the kind null issue in HelmDeployV1 (#20990)
This PR adds the pipeline feature SkipHelmManifestNullParts to the HelmDeployV1 task. This feature allows task to skip the unparsed null parts from js-yaml on get manifest command.
1 parent 9c9e34d commit 8ac8573

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Tasks/HelmDeployV1/src/utils.ts

+6
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@ export function getManifestsFromRelease(helmCli: helmcli, releaseName: string):
7474
helmCli.addArgument('--namespace '.concat(namespace));
7575

7676
const execResult = helmCli.execHelmCommand(true);
77+
const skipHelmManifestNullParts = tl.getPipelineFeature("SkipHelmManifestNullParts");
78+
7779
yaml.safeLoadAll(execResult.stdout, (doc) => {
80+
if (skipHelmManifestNullParts && doc === null) {
81+
return;
82+
}
83+
7884
manifests.push(doc);
7985
});
8086

Tasks/HelmDeployV1/task.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"author": "Microsoft Corporation",
1414
"version": {
1515
"Major": 1,
16-
"Minor": 255,
16+
"Minor": 256,
1717
"Patch": 0
1818
},
1919
"demands": [],

Tasks/HelmDeployV1/task.loc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"author": "Microsoft Corporation",
1414
"version": {
1515
"Major": 1,
16-
"Minor": 255,
16+
"Minor": 256,
1717
"Patch": 0
1818
},
1919
"demands": [],

0 commit comments

Comments
 (0)