diff --git a/lib/modules/manager/helmfile/artifacts.spec.ts b/lib/modules/manager/helmfile/artifacts.spec.ts index bafac29a11a157d213c02106f094ae8db5bf19d2..9c699bcfbbf9e01b2214007838a3c824730a7633 100644 --- a/lib/modules/manager/helmfile/artifacts.spec.ts +++ b/lib/modules/manager/helmfile/artifacts.spec.ts @@ -167,6 +167,8 @@ describe('modules/manager/helmfile/artifacts', () => { '-w "/tmp/github/some/repo" ' + 'renovate/sidecar ' + 'bash -l -c "' + + 'install-tool helm v3.7.2' + + ' && ' + 'install-tool helmfile v0.129.0' + ' && ' + 'helmfile deps -f helmfile.yaml' + @@ -177,6 +179,7 @@ describe('modules/manager/helmfile/artifacts', () => { { binarySource: 'install', expectedCommands: [ + { cmd: 'install-tool helm v3.7.2' }, { cmd: 'install-tool helmfile v0.129.0' }, { cmd: 'helmfile deps -f helmfile.yaml' }, ], @@ -193,6 +196,10 @@ describe('modules/manager/helmfile/artifacts', () => { '/tmp/renovate/cache/__renovate-private-cache' ); fs.getParentDir.mockReturnValue(''); + // helm + datasource.getPkgReleases.mockResolvedValueOnce({ + releases: [{ version: 'v3.7.2' }], + }); datasource.getPkgReleases.mockResolvedValueOnce({ releases: [{ version: 'v0.129.0' }], }); diff --git a/lib/modules/manager/helmfile/artifacts.ts b/lib/modules/manager/helmfile/artifacts.ts index 458f78c3e69cb5e001d927b2b73310260d3f57cb..c7a9f23ae5ff0c59d2e2e11ed99ee9b8c8c9e0f6 100644 --- a/lib/modules/manager/helmfile/artifacts.ts +++ b/lib/modules/manager/helmfile/artifacts.ts @@ -3,7 +3,7 @@ import { quote } from 'shlex'; import { TEMPORARY_ERROR } from '../../../constants/error-messages'; import { logger } from '../../../logger'; import { exec } from '../../../util/exec'; -import type { ExecOptions, ToolConstraint } from '../../../util/exec/types'; +import type { ExecOptions } from '../../../util/exec/types'; import { getSiblingFileName, readLocalFile, @@ -39,15 +39,20 @@ export async function updateArtifacts({ try { await writeLocalFile(packageFileName, newPackageFileContent); - const helmfileToolConstraint: ToolConstraint = { - toolName: 'helmfile', - constraint: config.constraints?.helmfile, - }; const execOptions: ExecOptions = { docker: {}, extraEnv: {}, - toolConstraints: [helmfileToolConstraint], + toolConstraints: [ + { + toolName: 'helm', + constraint: config.constraints?.helm, + }, + { + toolName: 'helmfile', + constraint: config.constraints?.helmfile, + }, + ], }; await exec(`helmfile deps -f ${quote(packageFileName)}`, execOptions);