Skip to content
Snippets Groups Projects
Unverified Commit e368cde1 authored by Nikolai Røed Kristiansen's avatar Nikolai Røed Kristiansen Committed by GitHub
Browse files

fix(manager/helmfile): Detect more local charts (#21093)

parent 5110d43d
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,12 @@ releases: ...@@ -10,6 +10,12 @@ releases:
- name: "{{ requiredEnv \"RELEASE_NAME\" }}" - name: "{{ requiredEnv \"RELEASE_NAME\" }}"
namespace: default namespace: default
chart: ./foo chart: ./foo
- name: "{{ requiredEnv \"RELEASE_NAME\" }}"
namespace: default
chart: ../bar
- name: "{{ requiredEnv \"RELEASE_NAME\" }}"
namespace: default
chart: /baz
- name: {{ requiredEnv "RELEASE_NAME" }} - name: {{ requiredEnv "RELEASE_NAME" }}
namespace: default namespace: default
chart: ./foo chart: ./foo
......
...@@ -335,6 +335,14 @@ describe('modules/manager/helmfile/extract', () => { ...@@ -335,6 +335,14 @@ describe('modules/manager/helmfile/extract', () => {
expect(result).toMatchObject({ expect(result).toMatchObject({
datasource: 'helm', datasource: 'helm',
deps: [ deps: [
{
depName: '',
skipReason: 'local-chart',
},
{
depName: '',
skipReason: 'local-chart',
},
{ {
depName: '', depName: '',
skipReason: 'local-chart', skipReason: 'local-chart',
......
...@@ -59,8 +59,8 @@ export function extractPackageFile( ...@@ -59,8 +59,8 @@ export function extractPackageFile(
}; };
} }
// If starts with ./ is for sure a local path // If it starts with ./ ../ or / then it's a local path
if (dep.chart.startsWith('./')) { if (['./', '../', '/'].some((val) => dep.chart.startsWith(val))) {
return { return {
depName: dep.name, depName: dep.name,
skipReason: 'local-chart', skipReason: 'local-chart',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment