Skip to content

Commit

Permalink
Merge pull request #388 from projectsyn/fix/commodore-helm-file-pattern
Browse files Browse the repository at this point in the history
Fix `fileMatch` for commodore-helm manager
  • Loading branch information
simu authored Jan 31, 2025
2 parents 7955325 + 234bdb4 commit 0604108
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion src/commodore-helm/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { loadFixture, getFixturePath, getLoggerErrors } from '../test/util';
import { extractPackageFile, extractAllPackageFiles } from './index';
import {
defaultConfig,
extractPackageFile,
extractAllPackageFiles,
} from './index';
import { beforeEach, expect, describe, it } from '@jest/globals';

import { GlobalConfig } from 'renovate/dist/config/global';
Expand Down Expand Up @@ -325,5 +329,14 @@ describe('manager/commodore-helm/index', () => {
}
}
});
it("doesn't match golden test files as files to renovate", async () => {
expect(defaultConfig.fileMatch.length).toBe(1);
const re = new RegExp(defaultConfig.fileMatch[0]);
expect(re.test('class/defaults.yml')).toBe(true);
expect(re.test('class/component-name.yml')).toBe(true);
expect(re.test('class/name.yaml')).toBe(true);
expect(re.test('tests/golden/storageclass/sc.yaml')).toBe(false);
expect(re.test('tests/golden/class/class.yaml')).toBe(false);
});
});
});
2 changes: 1 addition & 1 deletion src/commodore-helm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface KapitanHelmDependency extends KapitanDependency {

export const defaultConfig = {
// match all class files of the component
fileMatch: ['class/[^.]+.ya?ml$'],
fileMatch: ['^class/[^.]+.ya?ml$'],
};

export const supportedDatasources = [HelmDatasource.id];
Expand Down

0 comments on commit 0604108

Please sign in to comment.