fix: use semver constraint instead of 'latest' for ArgoCD OCI helm targetRevision
Some checks failed
Build & Release / build (push) Has been cancelled
Some checks failed
Build & Release / build (push) Has been cancelled
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user