fix: use semver constraint instead of 'latest' for ArgoCD OCI helm targetRevision
Some checks failed
Build & Release / build (push) Has been cancelled

This commit is contained in:
Ryan Moon
2026-04-03 19:43:20 -05:00
parent 5f79f46329
commit bbe5bd9a0e
2 changed files with 3 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ const PGBOUNCER_PORT = 5432;
const ProvisionSchema = z.object({
slug: z.string().min(2).max(32).regex(/^[a-z0-9-]+$/, "lowercase letters, numbers, and hyphens only"),
name: z.string().min(1).max(128),
appVersion: z.string().default("latest"),
appVersion: z.string().default("*"),
modules: z.array(z.enum(MODULES)).default([]),
startDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).default(() => new Date().toISOString().slice(0, 10)),
expirationDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).nullable().default(null),

View File

@@ -51,6 +51,7 @@ export function removeCustomerChart(slug: string) {
}
function buildArgoCDApp(slug: string, appVersion: string): string {
const revision = appVersion === "*" || appVersion === "latest" ? ">=0.0.1" : appVersion;
return `apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
@@ -61,7 +62,7 @@ spec:
source:
repoURL: registry.digitalocean.com/lunarfront
chart: lunarfront
targetRevision: "${appVersion}"
targetRevision: "${revision}"
helm:
parameters:
- name: ingress.host