diff --git a/lib/manager/helmfile/__fixtures__/multidoc.yaml b/lib/manager/helmfile/__fixtures__/multidoc.yaml index 38eec976c5a343622e5439f878b698ef0af95b38..bbf5eec4cb3a78d7552b6372078d6c25dce73828 100644 --- a/lib/manager/helmfile/__fixtures__/multidoc.yaml +++ b/lib/manager/helmfile/__fixtures__/multidoc.yaml @@ -60,3 +60,5 @@ releases: needs: - manifests version: 13.7.2 + +- name: invalid diff --git a/lib/manager/helmfile/__snapshots__/extract.spec.ts.snap b/lib/manager/helmfile/__snapshots__/extract.spec.ts.snap index b1072bc5845c24c4447ac7f19fc59f5a26d68222..ee74ff3c3ad072f7e2fc04b5866cb715b5550e21 100644 --- a/lib/manager/helmfile/__snapshots__/extract.spec.ts.snap +++ b/lib/manager/helmfile/__snapshots__/extract.spec.ts.snap @@ -22,6 +22,10 @@ Object { "https://prometheus-community.github.io/helm-charts", ], }, + Object { + "depName": "invalid", + "skipReason": "invalid-name", + }, ], } `; diff --git a/lib/manager/helmfile/extract.spec.ts b/lib/manager/helmfile/extract.spec.ts index 09b2a2290b9c589033e75925ab58bad7556e21e7..5f74c036bc3f66be89b63b645e81fe5f56e7a489 100644 --- a/lib/manager/helmfile/extract.spec.ts +++ b/lib/manager/helmfile/extract.spec.ts @@ -1,5 +1,5 @@ import { getName, loadFixture } from '../../../test/util'; -import { extractPackageFile } from './extract'; +import { extractPackageFile } from '.'; const multidocYaml = loadFixture('multidoc.yaml'); diff --git a/lib/manager/helmfile/extract.ts b/lib/manager/helmfile/extract.ts index f15090b1813f54bb5055f16fab5b917c6280046f..c2cc664568b42ee1f07692d59736f0df5101d3df 100644 --- a/lib/manager/helmfile/extract.ts +++ b/lib/manager/helmfile/extract.ts @@ -39,12 +39,19 @@ export function extractPackageFile( let depName = dep.chart; let repoName = null; + if (!is.string(dep.chart)) { + return { + depName: dep.name, + skipReason: SkipReason.InvalidName, + }; + } + // If starts with ./ is for sure a local path if (dep.chart.startsWith('./')) { return { depName, - skipReason: 'local-chart', - } as PackageDependency; + skipReason: SkipReason.LocalChart, + }; } if (dep.chart.includes('/')) { diff --git a/lib/manager/helmfile/types.ts b/lib/manager/helmfile/types.ts index 8c6b6a19bb31b651cc872afa712fa3bf02e2a99a..c84d8377f97189500858f3ce8ff032c9af68e0f4 100644 --- a/lib/manager/helmfile/types.ts +++ b/lib/manager/helmfile/types.ts @@ -1,5 +1,6 @@ export interface Doc { releases?: { + name: string; chart: string; version: string; }[];