fix(helmfile): remove templates before running updating artifacts (#30139)

This commit is contained in:
Sebastian Poxhofer 2024-07-12 09:24:37 +02:00 committed by GitHub
parent 61e0c39f70
commit 8e4698049d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 5 deletions

View file

@ -40,6 +40,9 @@ releases:
- name: backstage
chart: backstage/backstage
version: 0.12.0
{{- if eq .Environment.Name "test" }}
installed: false
{{- end }}
- name: oauth-proxy
chart: oauth2-proxy/oauth2-proxy
version: 6.8.0

View file

@ -13,7 +13,7 @@ import {
import { getFile } from '../../../util/git';
import { regEx } from '../../../util/regex';
import { Result } from '../../../util/result';
import { Yaml } from '../../../util/schema-utils';
import { parseSingleYaml } from '../../../util/yaml';
import { generateHelmEnvs } from '../helmv3/common';
import type { UpdateArtifact, UpdateArtifactsResult } from '../types';
import { Doc, LockVersion } from './schema';
@ -70,10 +70,10 @@ export async function updateArtifacts({
}
const cmd: string[] = [];
const doc = Result.parse(
newPackageFileContent,
Yaml.pipe(Doc),
).unwrapOrThrow();
const doc = parseSingleYaml(newPackageFileContent, {
removeTemplates: true,
customSchema: Doc,
});
for (const value of coerceArray(doc.repositories).filter(isOCIRegistry)) {
const loginCmd = await generateRegistryLoginCmd(