fix(manager:helmfile): add chart check (#11103)

This commit is contained in:
Michael Kriese 2021-08-05 09:38:12 +02:00 committed by GitHub
parent 17daab1920
commit 9fd3b96e14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 3 deletions

View file

@ -60,3 +60,5 @@ releases:
needs:
- manifests
version: 13.7.2
- name: invalid

View file

@ -22,6 +22,10 @@ Object {
"https://prometheus-community.github.io/helm-charts",
],
},
Object {
"depName": "invalid",
"skipReason": "invalid-name",
},
],
}
`;

View file

@ -1,5 +1,5 @@
import { getName, loadFixture } from '../../../test/util';
import { extractPackageFile } from './extract';
import { extractPackageFile } from '.';
const multidocYaml = loadFixture('multidoc.yaml');

View file

@ -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('/')) {

View file

@ -1,5 +1,6 @@
export interface Doc {
releases?: {
name: string;
chart: string;
version: string;
}[];