diff --git a/lib/modules/manager/helmfile/extract.spec.ts b/lib/modules/manager/helmfile/extract.spec.ts index c3b1a7be23430ccfeedebec5d1ca8c61353262cc..9ce660515e782f14a90bd9edf4982855643f9065 100644 --- a/lib/modules/manager/helmfile/extract.spec.ts +++ b/lib/modules/manager/helmfile/extract.spec.ts @@ -483,5 +483,32 @@ describe('modules/manager/helmfile/extract', () => { managerData: { needKustomize: true }, }); }); + + it('makes sure url joiner works correctly', async () => { + const content = codeBlock` + releases: + - name: argocd + version: 0.4.2 + chart: oci://gitlab.example.com:5000/group/subgroup + `; + const fileName = 'helmfile.yaml'; + const result = await extractPackageFile(content, fileName, { + registryAliases: { + stable: 'https://charts.helm.sh/stable', + }, + }); + expect(result).toMatchObject({ + datasource: 'helm', + deps: [ + { + currentValue: '0.4.2', + datasource: 'docker', + depName: 'subgroup', + packageName: 'gitlab.example.com:5000/group/subgroup', + registryUrls: [], + }, + ], + }); + }); }); }); diff --git a/lib/modules/manager/helmfile/extract.ts b/lib/modules/manager/helmfile/extract.ts index 3ae60131160ca0b1d97a916e4db677cb08a94a8b..07f0ce0868dfb8881c40d9f993e621b7b806328a 100644 --- a/lib/modules/manager/helmfile/extract.ts +++ b/lib/modules/manager/helmfile/extract.ts @@ -2,7 +2,6 @@ import is from '@sindresorhus/is'; import { logger } from '../../../logger'; import { coerceArray } from '../../../util/array'; import { regEx } from '../../../util/regex'; -import { joinUrlParts } from '../../../util/url'; import { parseYaml } from '../../../util/yaml'; import { DockerDatasource } from '../../datasource/docker'; import { HelmDatasource } from '../../datasource/helm'; @@ -118,12 +117,12 @@ export async function extractPackageFile( if (isOCIRegistry(dep.chart)) { res.datasource = DockerDatasource.id; - res.packageName = joinUrlParts(repoName, depName); + res.packageName = `${repoName}/${depName}`; } else if (registryData[repoName]?.oci) { res.datasource = DockerDatasource.id; const alias = registryData[repoName]?.url; if (alias) { - res.packageName = joinUrlParts(alias, depName); + res.packageName = `${alias}/${depName}`; } }