From 12af4ae9470b140232dffda07f4c1d342eda6a1b Mon Sep 17 00:00:00 2001 From: Kevin Franklin Kim Date: Thu, 20 Nov 2025 12:33:51 +0100 Subject: [PATCH 1/5] feat: add --merge for custom template strings --- internal/config/bake.go | 50 ++++++++++++++++---------------- internal/config/build.go | 2 +- squadron.go | 62 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 86 insertions(+), 28 deletions(-) diff --git a/internal/config/bake.go b/internal/config/bake.go index 3298fe6..370321e 100644 --- a/internal/config/bake.go +++ b/internal/config/bake.go @@ -18,31 +18,31 @@ type BakeTarget struct { // Inherits is the only field that cannot be overridden with --set Inherits []string `json:"inherits,omitempty" yaml:"inherits,omitempty" hcl:"inherits,optional"` - Annotations []string `json:"annotations,omitempty" yaml:"annotations,omitempty" hcl:"annotations,optional"` - Attest []map[string]any `json:"attest,omitempty" yaml:"attest,omitempty" hcl:"attest,optional"` - Context string `json:"context,omitempty" yaml:"context,omitempty" hcl:"context,optional"` - Contexts map[string]string `json:"contexts,omitempty" yaml:"contexts,omitempty" hcl:"contexts,optional"` - Dockerfile string `json:"dockerfile,omitempty" yaml:"dockerfile,omitempty" hcl:"dockerfile,optional"` - DockerfileInline string `json:"dockerfile-inline,omitempty" yaml:"dockerfile-inline,omitempty" hcl:"dockerfile-inline,optional"` - Args map[string]string `json:"args,omitempty" yaml:"args,omitempty" hcl:"args,optional"` - Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty" hcl:"labels,optional"` - Tags []string `json:"tags,omitempty" yaml:"tags,omitempty" hcl:"tags,optional"` - CacheFrom map[string]string `json:"cache-from,omitempty" yaml:"cache-from,omitempty" hcl:"cache-from,optional"` - CacheTo map[string]string `json:"cache-to,omitempty" yaml:"cache-to,omitempty" hcl:"cache-to,optional"` - Target string `json:"target,omitempty" yaml:"target,omitempty" hcl:"target,optional"` - Secrets []map[string]any `json:"secret,omitempty" yaml:"secret,omitempty" hcl:"secret,label,optional"` - SSH []map[string]any `json:"ssh,omitempty" yaml:"ssh,omitempty" hcl:"ssh,optional"` - Platforms []string `json:"platforms,omitempty" yaml:"platforms,omitempty" hcl:"platforms,optional"` - Outputs []map[string]any `json:"output,omitempty" yaml:"output,omitempty" hcl:"output,optional"` - Pull bool `json:"pull,omitempty" yaml:"pull,omitempty" hcl:"pull,optional"` - NoCache bool `json:"no-cache,omitempty" yaml:"no-cache,omitempty" hcl:"no-cache,optional"` - NetworkMode string `json:"network,omitempty" yaml:"network,omitempty" hcl:"network,optional"` - NoCacheFilter []string `json:"no-cache-filter,omitempty" yaml:"no-cache-filter,omitempty" hcl:"no-cache-filter,optional"` - ShmSize string `json:"shm-size,omitempty" yaml:"shm-size,omitempty" hcl:"shm-size,optional"` - Ulimits []string `json:"ulimits,omitempty" yaml:"ulimits,omitempty" hcl:"ulimits,optional"` - Call string `json:"call,omitempty" yaml:"call,omitempty" hcl:"call,optional"` - Entitlements []string `json:"entitlements,omitempty" yaml:"entitlements,omitempty" hcl:"entitlements,optional"` - ExtraHosts map[string]string `json:"extra-hosts,omitempty" yaml:"extra-hosts,omitempty" hcl:"extra-hosts,optional"` + Annotations []string `json:"annotations,omitempty" yaml:"annotations,omitempty" hcl:"annotations,optional"` + Attest []map[string]any `json:"attest,omitempty" yaml:"attest,omitempty" hcl:"attest,optional"` + Context string `json:"context,omitempty" yaml:"context,omitempty" hcl:"context,optional"` + Contexts map[string]string `json:"contexts,omitempty" yaml:"contexts,omitempty" hcl:"contexts,optional"` + Dockerfile string `json:"dockerfile,omitempty" yaml:"dockerfile,omitempty" hcl:"dockerfile,optional"` + DockerfileInline string `json:"dockerfile-inline,omitempty" yaml:"dockerfile-inline,omitempty" hcl:"dockerfile-inline,optional"` + Args map[string]string `json:"args,omitempty" yaml:"args,omitempty" hcl:"args,optional"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty" hcl:"labels,optional"` + Tags []string `json:"tags,omitempty" yaml:"tags,omitempty" hcl:"tags,optional"` + CacheFrom []map[string]string `json:"cache-from,omitempty" yaml:"cache-from,omitempty" hcl:"cache-from,optional"` + CacheTo []map[string]string `json:"cache-to,omitempty" yaml:"cache-to,omitempty" hcl:"cache-to,optional"` + Target string `json:"target,omitempty" yaml:"target,omitempty" hcl:"target,optional"` + Secrets []map[string]any `json:"secret,omitempty" yaml:"secret,omitempty" hcl:"secret,label,optional"` + SSH []map[string]any `json:"ssh,omitempty" yaml:"ssh,omitempty" hcl:"ssh,optional"` + Platforms []string `json:"platforms,omitempty" yaml:"platforms,omitempty" hcl:"platforms,optional"` + Outputs []map[string]any `json:"output,omitempty" yaml:"output,omitempty" hcl:"output,optional"` + Pull bool `json:"pull,omitempty" yaml:"pull,omitempty" hcl:"pull,optional"` + NoCache bool `json:"no-cache,omitempty" yaml:"no-cache,omitempty" hcl:"no-cache,optional"` + NetworkMode string `json:"network,omitempty" yaml:"network,omitempty" hcl:"network,optional"` + NoCacheFilter []string `json:"no-cache-filter,omitempty" yaml:"no-cache-filter,omitempty" hcl:"no-cache-filter,optional"` + ShmSize string `json:"shm-size,omitempty" yaml:"shm-size,omitempty" hcl:"shm-size,optional"` + Ulimits []string `json:"ulimits,omitempty" yaml:"ulimits,omitempty" hcl:"ulimits,optional"` + Call string `json:"call,omitempty" yaml:"call,omitempty" hcl:"call,optional"` + Entitlements []string `json:"entitlements,omitempty" yaml:"entitlements,omitempty" hcl:"entitlements,optional"` + ExtraHosts map[string]string `json:"extra-hosts,omitempty" yaml:"extra-hosts,omitempty" hcl:"extra-hosts,optional"` // NOTE: use typed once it can be rendered as slice // Attest buildflags.Attests `json:"attest,omitempty" yaml:"attest,omitempty" hcl:"attest,optional"` // Secrets buildflags.Secrets `json:"secret,omitempty" yaml:"secret,omitempty" hcl:"secret,label,optional"` diff --git a/internal/config/build.go b/internal/config/build.go index 9f8b6c9..de47941 100644 --- a/internal/config/build.go +++ b/internal/config/build.go @@ -130,7 +130,7 @@ func (b *Build) Build(ctx context.Context, squadron, unit string, args []string) Arg(argOverride("--metadata-file", b.MetadataFile, args)). Arg(argOverride("--network", b.Network, args)). BoolArg(boolArgOverride("--no-cache", b.NoCache, args)). - ListArg("--noe-cache-filter", b.NoCacheFilter). + ListArg("--no-cache-filter", b.NoCacheFilter). Arg(argOverride("--output", b.Output, args)). Arg(argOverride("--platform", b.Platform, args)). // Arg("--progress", xxx). diff --git a/squadron.go b/squadron.go index 9a36ca5..3a3990f 100644 --- a/squadron.go +++ b/squadron.go @@ -15,6 +15,7 @@ import ( "sync" "time" + "dario.cat/mergo" "github.com/foomo/squadron/internal/config" "github.com/foomo/squadron/internal/jsonschema" ptermx "github.com/foomo/squadron/internal/pterm" @@ -413,6 +414,18 @@ func (sq *Squadron) Bake(ctx context.Context, bakeArgs []string) error { pterm.Debug.Println("failed to get git info:", err) } + var ( + mergeArgs []string + cleanArgs []string + ) + for _, arg := range bakeArgs { + if strings.HasPrefix(arg, "--merge=") { + mergeArgs = append(mergeArgs, strings.Split(strings.TrimPrefix(arg, "--merge="), " ")...) + } else { + cleanArgs = append(cleanArgs, arg) + } + } + _ = sq.Config().Squadrons.Iterate(ctx, func(ctx context.Context, key string, value config.Map[*config.Unit]) error { _ = value.Iterate(ctx, func(ctx context.Context, k string, v *config.Unit) error { for _, name := range v.BakeNames() { @@ -422,10 +435,55 @@ func (sq *Squadron) Bake(ctx context.Context, bakeArgs []string) error { if item.Args == nil { item.Args = make(map[string]string) } - item.Args["SQUADRON_NAME"] = key item.Args["SQUADRON_UNIT_NAME"] = k maps.Copy(item.Args, gitInfo) + + if len(mergeArgs) > 0 { + argMap := map[string]any{} + for _, arg := range mergeArgs { + var err error + argKeyVal := strings.SplitN(arg, "=", 2) + argKey, argVal := argKeyVal[0], argKeyVal[1] + argVal, err = util.RenderTemplateString(argVal, map[string]any{"Name": name, "Squadron": key, "Unit": k, "Bake": item}) + if err != nil { + pterm.Fatal.Println("failed to render template:", err, argVal) + return err + } + + switch { + case strings.HasPrefix(argVal, "[]") && strings.Contains(argVal, "="): + result := make(map[string]string) + pairs := strings.Split(strings.TrimPrefix(argVal, "[]"), ",") + for _, p := range pairs { + kv := strings.SplitN(strings.TrimSpace(p), "=", 2) + if len(kv) == 2 { + result[strings.TrimSpace(kv[0])] = strings.TrimSpace(kv[1]) + } + } + argMap[argKey] = []map[string]string{result} + case strings.Contains(argVal, "="): + result := make(map[string]string) + pairs := strings.Split(argVal, ",") + for _, p := range pairs { + kv := strings.SplitN(strings.TrimSpace(p), "=", 2) + if len(kv) == 2 { + result[strings.TrimSpace(kv[0])] = strings.TrimSpace(kv[1]) + } + } + argMap[argKey] = result + case strings.Contains(argVal, ","): + argMap[argKey] = strings.Split(argVal, ",") + default: + argMap[argKey] = argVal + } + } + if err := mergo.Map(&item, argMap, mergo.WithAppendSlice); err != nil { + pterm.Fatal.Println("failed merge args:", err) + return err + } + } + pterm.Info.Printfln("📦 | %s/%s.%s (%s)", key, k, name, strings.Join(item.Tags, ",")) g.Targets = append(g.Targets, item.Name) c.Targets = append(c.Targets, &item) @@ -453,7 +511,7 @@ func (sq *Squadron) Bake(ctx context.Context, bakeArgs []string) error { out, err := util.NewDockerCommand(). Bake(bytes.NewReader(b)). - Args(bakeArgs...). + Args(cleanArgs...). Stderr(ptermx.NewWriter(pterm.Debug)). Run(ctx) if err != nil { From 9bb3b315110c44af42ce50d54281a8e6ef73d69b Mon Sep 17 00:00:00 2001 From: Kevin Franklin Kim Date: Thu, 20 Nov 2025 18:03:41 +0100 Subject: [PATCH 2/5] refactor: change git vaolues --- squadron.go | 86 +++++++++++++---------------------------------------- 1 file changed, 20 insertions(+), 66 deletions(-) diff --git a/squadron.go b/squadron.go index 3a3990f..1585873 100644 --- a/squadron.go +++ b/squadron.go @@ -15,7 +15,6 @@ import ( "sync" "time" - "dario.cat/mergo" "github.com/foomo/squadron/internal/config" "github.com/foomo/squadron/internal/jsonschema" ptermx "github.com/foomo/squadron/internal/pterm" @@ -414,18 +413,6 @@ func (sq *Squadron) Bake(ctx context.Context, bakeArgs []string) error { pterm.Debug.Println("failed to get git info:", err) } - var ( - mergeArgs []string - cleanArgs []string - ) - for _, arg := range bakeArgs { - if strings.HasPrefix(arg, "--merge=") { - mergeArgs = append(mergeArgs, strings.Split(strings.TrimPrefix(arg, "--merge="), " ")...) - } else { - cleanArgs = append(cleanArgs, arg) - } - } - _ = sq.Config().Squadrons.Iterate(ctx, func(ctx context.Context, key string, value config.Map[*config.Unit]) error { _ = value.Iterate(ctx, func(ctx context.Context, k string, v *config.Unit) error { for _, name := range v.BakeNames() { @@ -435,55 +422,10 @@ func (sq *Squadron) Bake(ctx context.Context, bakeArgs []string) error { if item.Args == nil { item.Args = make(map[string]string) } + item.Args["SQUADRON_NAME"] = key item.Args["SQUADRON_UNIT_NAME"] = k maps.Copy(item.Args, gitInfo) - - if len(mergeArgs) > 0 { - argMap := map[string]any{} - for _, arg := range mergeArgs { - var err error - argKeyVal := strings.SplitN(arg, "=", 2) - argKey, argVal := argKeyVal[0], argKeyVal[1] - argVal, err = util.RenderTemplateString(argVal, map[string]any{"Name": name, "Squadron": key, "Unit": k, "Bake": item}) - if err != nil { - pterm.Fatal.Println("failed to render template:", err, argVal) - return err - } - - switch { - case strings.HasPrefix(argVal, "[]") && strings.Contains(argVal, "="): - result := make(map[string]string) - pairs := strings.Split(strings.TrimPrefix(argVal, "[]"), ",") - for _, p := range pairs { - kv := strings.SplitN(strings.TrimSpace(p), "=", 2) - if len(kv) == 2 { - result[strings.TrimSpace(kv[0])] = strings.TrimSpace(kv[1]) - } - } - argMap[argKey] = []map[string]string{result} - case strings.Contains(argVal, "="): - result := make(map[string]string) - pairs := strings.Split(argVal, ",") - for _, p := range pairs { - kv := strings.SplitN(strings.TrimSpace(p), "=", 2) - if len(kv) == 2 { - result[strings.TrimSpace(kv[0])] = strings.TrimSpace(kv[1]) - } - } - argMap[argKey] = result - case strings.Contains(argVal, ","): - argMap[argKey] = strings.Split(argVal, ",") - default: - argMap[argKey] = argVal - } - } - if err := mergo.Map(&item, argMap, mergo.WithAppendSlice); err != nil { - pterm.Fatal.Println("failed merge args:", err) - return err - } - } - pterm.Info.Printfln("📦 | %s/%s.%s (%s)", key, k, name, strings.Join(item.Tags, ",")) g.Targets = append(g.Targets, item.Name) c.Targets = append(c.Targets, &item) @@ -511,12 +453,16 @@ func (sq *Squadron) Bake(ctx context.Context, bakeArgs []string) error { out, err := util.NewDockerCommand(). Bake(bytes.NewReader(b)). - Args(cleanArgs...). + Args(bakeArgs...). Stderr(ptermx.NewWriter(pterm.Debug)). Run(ctx) if err != nil { - pterm.Println(util.HighlightHCL(string(b))) - return errors.Wrap(err, out) + if pterm.PrintDebugMessages { + return err + } else { + pterm.Println(util.HighlightHCL(string(b) + "\n")) + return errors.Wrap(err, out) + } } pterm.Success.Println("🔥 | baking containers ⏱︎ " + time.Since(start).Truncate(time.Millisecond).String()) @@ -1236,6 +1182,14 @@ func (sq *Squadron) getReleaseName(squadron, unit string, u *config.Unit) string func (sq *Squadron) getGitInfo(ctx context.Context) (map[string]string, error) { ret := map[string]string{} + if _, ok := os.LookupEnv("GITHUB_ACTIONS"); ok { + ret["GIT_TYPE"] = os.Getenv("GITHUB_REF_TYPE") + ret["GIT_NAME"] = os.Getenv("GITHUB_REF_NAME") + ret["GIT_HASH"] = os.Getenv("GITHUB_SHA") + ret["GIT_URL"] = os.Getenv("GITHUB_SERVER_URL") + "/" + os.Getenv("GITHUB_REPOSITORY") + return ret, nil + } + dir := "." for _, s := range []string{"GIT_DIR", "PROJECT_ROOT"} { @@ -1272,7 +1226,7 @@ func (sq *Squadron) getGitInfo(ctx context.Context) (map[string]string, error) { } } - ret["GIT_REPOSITORY_URL"] = url + ret["GIT_URL"] = url } // Get HEAD reference to find the current branch or commit @@ -1282,13 +1236,13 @@ func (sq *Squadron) getGitInfo(ctx context.Context) (map[string]string, error) { } ret["GIT_TYPE"] = "branch" - ret["GIT_BRANCH"] = ref.Name().Short() - ret["GIT_COMMIT_HASH"] = ref.Hash().String() + ret["GIT_NAME"] = ref.Name().Short() + ret["GIT_HASH"] = ref.Hash().String() if t, err := repo.Tags(); err == nil { _ = t.ForEach(func(reference *plumbing.Reference) error { if ref.Hash() == reference.Hash() { - ret["GIT_TAG"] = reference.Name().Short() + ret["GIT_NAME"] = reference.Name().Short() ret["GIT_TYPE"] = "tag" return errors.New("break") From 9ebb79cea7ee1e68107245a8b7fb35f328677e61 Mon Sep 17 00:00:00 2001 From: Kevin Franklin Kim Date: Thu, 20 Nov 2025 23:10:47 +0100 Subject: [PATCH 3/5] fix: lint issues --- .lefthook.yaml | 1 + squadron.go | 1 + 2 files changed, 2 insertions(+) diff --git a/.lefthook.yaml b/.lefthook.yaml index 9a00715..23516eb 100644 --- a/.lefthook.yaml +++ b/.lefthook.yaml @@ -4,6 +4,7 @@ output: [ summary ] pre-commit: skip: [ merge, rebase ] + parallel: true commands: branch-name: run: | diff --git a/squadron.go b/squadron.go index 1585873..7925d32 100644 --- a/squadron.go +++ b/squadron.go @@ -1187,6 +1187,7 @@ func (sq *Squadron) getGitInfo(ctx context.Context) (map[string]string, error) { ret["GIT_NAME"] = os.Getenv("GITHUB_REF_NAME") ret["GIT_HASH"] = os.Getenv("GITHUB_SHA") ret["GIT_URL"] = os.Getenv("GITHUB_SERVER_URL") + "/" + os.Getenv("GITHUB_REPOSITORY") + return ret, nil } From 87fa6a1e38ee993c52d14fed3acbbe404664c699 Mon Sep 17 00:00:00 2001 From: Kevin Franklin Kim Date: Thu, 20 Nov 2025 23:15:58 +0100 Subject: [PATCH 4/5] fix: lint issues --- Makefile | 2 + biome.json | 2 +- go.mod | 2 - go.sum | 44 +-- squadron.schema.json | 868 ++++++++++++++++++++++--------------------- 5 files changed, 441 insertions(+), 477 deletions(-) diff --git a/Makefile b/Makefile index 1963ea2..80c8969 100644 --- a/Makefile +++ b/Makefile @@ -45,12 +45,14 @@ tidy: ## Run linter lint: @echo "〉golangci-lint run" + @biome check @golangci-lint run .PHONY: lint.fix ## Fix lint violations lint.fix: @echo "〉golangci-lint run fix" + @biome check --write @golangci-lint run --fix .PHONY: test diff --git a/biome.json b/biome.json index ea412b6..96ffab7 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.5/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.6/schema.json", "vcs": { "enabled": true, "clientKind": "git", diff --git a/go.mod b/go.mod index 7906c82..8a6ef6e 100644 --- a/go.mod +++ b/go.mod @@ -86,12 +86,10 @@ require ( github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/pjbgf/sha1cd v0.5.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/rivo/uniseg v0.4.7 // indirect github.com/sagikazarmark/locafero v0.12.0 // indirect github.com/sergi/go-diff v1.4.0 // indirect github.com/shopspring/decimal v1.4.0 // indirect github.com/skeema/knownhosts v1.3.2 // indirect - github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/spf13/afero v1.15.0 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/spf13/pflag v1.0.10 // indirect diff --git a/go.sum b/go.sum index f5b402d..7d29e89 100644 --- a/go.sum +++ b/go.sum @@ -60,8 +60,6 @@ github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMU github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/clipperhouse/stringish v0.1.1 h1:+NSqMOr3GR6k1FdRhhnXrLfztGzuG+VuFDfatpWHKCs= github.com/clipperhouse/stringish v0.1.1/go.mod h1:v/WhFtE1q0ovMta2+m+UbpZ+2/HEXNWYXQgCt4hdOzA= -github.com/clipperhouse/uax29/v2 v2.2.0 h1:ChwIKnQN3kcZteTXMgb1wztSgaU+ZemkgWdohwgs8tY= -github.com/clipperhouse/uax29/v2 v2.2.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= github.com/clipperhouse/uax29/v2 v2.3.0 h1:SNdx9DVUqMoBuBoW3iLOj4FQv3dN5mDtuqwuhIGpJy4= github.com/clipperhouse/uax29/v2 v2.3.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g= github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= @@ -70,10 +68,6 @@ github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkX github.com/containerd/console v1.0.5 h1:R0ymNeydRqH2DmakFNdmjR2k0t7UPuiOV/N/27/qqsc= github.com/containerd/console v1.0.5/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= -github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= -github.com/cyphar/filepath-securejoin v0.5.0 h1:hIAhkRBMQ8nIeuVwcAoymp7MY4oherZdAxD+m0u9zaw= -github.com/cyphar/filepath-securejoin v0.5.0/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= github.com/cyphar/filepath-securejoin v0.6.1 h1:5CeZ1jPXEiYt3+Z6zqprSAgSWiggmpVyciv8syjIpVE= github.com/cyphar/filepath-securejoin v0.6.1/go.mod h1:A8hd4EnAeyujCJRrICiOWqjS1AX0a9kM5XL+NwKoYSc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -107,8 +101,6 @@ github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UN github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= -github.com/go-git/go-git/v5 v5.16.2 h1:fT6ZIOjE5iEnkzKyxTHK1W4HGAsPhqEqiSAssSO77hM= -github.com/go-git/go-git/v5 v5.16.2/go.mod h1:4Ge4alE/5gPs30F2H1esi2gPd69R0C39lolkucHBOp8= github.com/go-git/go-git/v5 v5.16.3 h1:Z8BtvxZ09bYm/yYNgPKCzgWtaRqDTgIKRgIRHBfU6Z8= github.com/go-git/go-git/v5 v5.16.3/go.mod h1:4Ge4alE/5gPs30F2H1esi2gPd69R0C39lolkucHBOp8= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= @@ -171,8 +163,6 @@ github.com/mailru/easyjson v0.9.1 h1:LbtsOm5WAswyWbvTEOqhypdPeZzHavpZx96/n553mR8 github.com/mailru/easyjson v0.9.1/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= -github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw= github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -209,20 +199,14 @@ github.com/pterm/pterm v0.12.31/go.mod h1:32ZAWZVXD7ZfG0s8qqHXePte42kdz8ECtRyEej github.com/pterm/pterm v0.12.33/go.mod h1:x+h2uL+n7CP/rel9+bImHD5lF3nM9vJj80k9ybiiTTE= github.com/pterm/pterm v0.12.36/go.mod h1:NjiL09hFhT/vWjQHSj1athJpx6H8cjpHXNAK5bUw8T8= github.com/pterm/pterm v0.12.40/go.mod h1:ffwPLwlbXxP+rxT0GsgDTzS3y3rmpAO1NMjUkGTYf8s= -github.com/pterm/pterm v0.12.81 h1:ju+j5I2++FO1jBKMmscgh5h5DPFDFMB7epEjSoKehKA= -github.com/pterm/pterm v0.12.81/go.mod h1:TyuyrPjnxfwP+ccJdBTeWHtd/e0ybQHkOS/TakajZCw= github.com/pterm/pterm v0.12.82 h1:+D9wYhCaeaK0FIQoZtqbNQuNpe2lB2tajKKsTd5paVQ= github.com/pterm/pterm v0.12.82/go.mod h1:TyuyrPjnxfwP+ccJdBTeWHtd/e0ybQHkOS/TakajZCw= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= -github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/runz0rd/conflate v1.2.2-0.20210920145208-fa48576ef06d h1:8dUCtZpbG3LOOV/6/HuO2xZF3R1sVUWcWejsFFa8M3A= github.com/runz0rd/conflate v1.2.2-0.20210920145208-fa48576ef06d/go.mod h1:F85f+vrE7SwfRoL31EpLZFa1sub0SDxzcwxDBxFvy7k= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= -github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= github.com/sagikazarmark/locafero v0.12.0 h1:/NQhBAkUb4+fH1jivKHWusDYFjMOOKU88eegjfxfHb4= github.com/sagikazarmark/locafero v0.12.0/go.mod h1:sZh36u/YSZ918v0Io+U9ogLYQJ9tLLBmM4eneO6WwsI= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= @@ -231,12 +215,8 @@ github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepq github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8= -github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY= github.com/skeema/knownhosts v1.3.2 h1:EDL9mgf4NzwMXCTfaxSD/o/a5fxDw/xL9nkU28JjdBg= github.com/skeema/knownhosts v1.3.2/go.mod h1:bEg3iQAuw+jyiw+484wwFJoKSLwcfd7fqRy+N0QTiow= -github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= -github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= @@ -302,8 +282,6 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI= -golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= @@ -312,8 +290,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= -golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= +golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -324,10 +301,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I= -golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= -golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM= -golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -335,8 +308,6 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= -golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -355,8 +326,6 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= -golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -364,8 +333,6 @@ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ= -golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA= golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -374,8 +341,6 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= -golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -384,8 +349,7 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= -golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -410,12 +374,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM= -k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk= k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY= k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw= -k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4= -k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4= k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= diff --git a/squadron.schema.json b/squadron.schema.json index 3e27892..2b899df 100644 --- a/squadron.schema.json +++ b/squadron.schema.json @@ -1,433 +1,437 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/foomo/squadron/refs/heads/main/squadron.schema.json", - "$ref": "#/$defs/Config", - "$defs": { - "BakeTarget": { - "properties": { - "description": { - "type": "string" - }, - "inherits": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Inherits is the only field that cannot be overridden with --set" - }, - "annotations": { - "items": { - "type": "string" - }, - "type": "array" - }, - "attest": { - "items": { - "type": "object" - }, - "type": "array" - }, - "context": { - "type": "string" - }, - "contexts": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "dockerfile": { - "type": "string" - }, - "dockerfile-inline": { - "type": "string" - }, - "args": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "cache-from": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "cache-to": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "target": { - "type": "string" - }, - "secret": { - "items": { - "type": "object" - }, - "type": "array" - }, - "ssh": { - "items": { - "type": "object" - }, - "type": "array" - }, - "platforms": { - "items": { - "type": "string" - }, - "type": "array" - }, - "output": { - "items": { - "type": "object" - }, - "type": "array" - }, - "pull": { - "type": "boolean" - }, - "no-cache": { - "type": "boolean" - }, - "network": { - "type": "string" - }, - "no-cache-filter": { - "items": { - "type": "string" - }, - "type": "array" - }, - "shm-size": { - "type": "string" - }, - "ulimits": { - "items": { - "type": "string" - }, - "type": "array" - }, - "call": { - "type": "string" - }, - "entitlements": { - "items": { - "type": "string" - }, - "type": "array" - }, - "extra-hosts": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - }, - "additionalProperties": false, - "type": "object" - }, - "Build": { - "properties": { - "context": { - "type": "string", - "description": "Build context" - }, - "add_host": { - "items": { - "type": "string" - }, - "type": "array", - "description": "AddHost add a custom host-to-IP mapping (format: \"host:ip\")" - }, - "allow": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Allow extra privileged entitlement (e.g., \"network.host\", \"security.insecure\")" - }, - "attest": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Attest parameters (format: \"type=sbom,generator=image\")" - }, - "build_arg": { - "items": { - "type": "string" - }, - "type": "array", - "description": "BuildArg set build-time variables" - }, - "build_context": { - "items": { - "type": "string" - }, - "type": "array", - "description": "BuildContext additional build contexts (e.g., name=path)" - }, - "builder": { - "type": "string", - "description": "Builder override the configured builder instance" - }, - "cache_from": { - "type": "string", - "description": "CacheFrom external cache sources (e.g., \"user/app:cache\", \"type=local,src=path/to/dir\")" - }, - "cache_to": { - "type": "string", - "description": "CacheTo cache export destinations (e.g., \"user/app:cache\", \"type=local,dest=path/to/dir\")" - }, - "cgroup_parent": { - "type": "string", - "description": "CGroupParent optional parent cgroup for the container" - }, - "file": { - "type": "string", - "description": "File name of the Dockerfile (default: \"PATH/Dockerfile\")" - }, - "iidfile": { - "type": "string", - "description": "IIDFile write the image ID to the file" - }, - "label": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Label wet metadata for an image" - }, - "load": { - "type": "boolean", - "description": "Load shorthand for \"--output=type=docker\"" - }, - "metadata_file": { - "type": "string", - "description": "MetadataFile write build result metadata to the file" - }, - "network": { - "type": "string", - "description": "Network set the networking mode for the \"RUN\" instructions during build (default \"default\")" - }, - "no_cache": { - "type": "boolean", - "description": "NoCache do not use cache when building the image" - }, - "no_cache_filter": { - "items": { - "type": "string" - }, - "type": "array", - "description": "NoCacheFilter do not cache specified stages" - }, - "output": { - "type": "string", - "description": "Output destination (format: \"type=local,dest=path\")" - }, - "platform": { - "type": "string", - "description": "Platform set target platform for build" - }, - "secret": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Secret to expose to the build (format: \"id=mysecret[,src=/local/secret]\")" - }, - "shm_size": { - "type": "string", - "description": "ShmSize size of \"/dev/shm\"" - }, - "ssh": { - "type": "string", - "description": "SSH agent socket or keys to expose to the build (format: \"default|\u003cid\u003e[=\u003csocket\u003e|\u003ckey\u003e[,\u003ckey\u003e]]\")" - }, - "tag": { - "type": "string", - "description": "Tag name and optionally a tag (format: \"name:tag\")" - }, - "image": { - "type": "string", - "description": "Image name" - }, - "target": { - "type": "string", - "description": "Target set the target build stage to build" - }, - "ulimit": { - "type": "string", - "description": "ULimit ulimit options (default [])" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Dependencies list of build names defined in the squadron configuration" - }, - "quiet": { - "type": "boolean", - "description": "Suppress the build output and print image ID on succes" - }, - "pull": { - "type": "boolean", - "description": "Always attempt to pull all referenced images" - }, - "push": { - "type": "boolean", - "description": "Shorthand for \"--output=type=registry\"" - } - }, - "additionalProperties": false, - "type": "object" - }, - "Chart": { - "properties": { - "name": { - "type": "string", - "description": "Chart name" - }, - "repository": { - "type": "string", - "description": "Chart repository" - }, - "schema": { - "type": "string", - "description": "Values schema json" - }, - "version": { - "type": "string", - "description": "Chart version" - }, - "alias": { - "type": "string", - "description": "Chart alias" - } - }, - "additionalProperties": false, - "type": "object" - }, - "Config": { - "properties": { - "version": { - "type": "string", - "pattern": "^[0-9]\\.[0-9]$", - "description": "Version of the schema" - }, - "vars": { - "type": "object", - "description": "Global values to be injected into all squadron values" - }, - "global": { - "type": "object", - "description": "Global values to be injected into all squadron values" - }, - "builds": { - "additionalProperties": { - "$ref": "#/$defs/Build" - }, - "type": "object", - "description": "Global builds that can be referenced as dependencies" - }, - "squadron": { - "additionalProperties": { - "additionalProperties": { - "$ref": "#/$defs/Unit" - }, - "type": "object" - }, - "type": "object", - "description": "Squadron definitions" - } - }, - "additionalProperties": false, - "type": "object", - "required": [ - "version" - ] - }, - "Tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "Unit": { - "properties": { - "name": { - "type": "string", - "description": "Optional release name" - }, - "namespace": { - "type": "string", - "description": "Optional release namespace" - }, - "chart": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/$defs/Chart" - } - ], - "description": "Chart settings" - }, - "tags": { - "$ref": "#/$defs/Tags", - "description": "List of tags" - }, - "priority": { - "type": "integer", - "description": "Installation priority, higher comes first" - }, - "extends": { - "type": "string", - "description": "Extend chart values" - }, - "kustomize": { - "type": "string", - "description": "Kustomize files path" - }, - "builds": { - "additionalProperties": { - "$ref": "#/$defs/Build" - }, - "type": "object", - "description": "Map of containers to build" - }, - "bakes": { - "additionalProperties": { - "$ref": "#/$defs/BakeTarget" - }, - "type": "object", - "description": "Map of containers to bakes" - }, - "values": { - "type": "object", - "description": "Chart values" - } - }, - "additionalProperties": false, - "type": "object" - } - } -} \ No newline at end of file + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/foomo/squadron/refs/heads/main/squadron.schema.json", + "$ref": "#/$defs/Config", + "$defs": { + "BakeTarget": { + "properties": { + "description": { + "type": "string" + }, + "inherits": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Inherits is the only field that cannot be overridden with --set" + }, + "annotations": { + "items": { + "type": "string" + }, + "type": "array" + }, + "attest": { + "items": { + "type": "object" + }, + "type": "array" + }, + "context": { + "type": "string" + }, + "contexts": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "dockerfile": { + "type": "string" + }, + "dockerfile-inline": { + "type": "string" + }, + "args": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "cache-from": { + "items": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": "array" + }, + "cache-to": { + "items": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": "array" + }, + "target": { + "type": "string" + }, + "secret": { + "items": { + "type": "object" + }, + "type": "array" + }, + "ssh": { + "items": { + "type": "object" + }, + "type": "array" + }, + "platforms": { + "items": { + "type": "string" + }, + "type": "array" + }, + "output": { + "items": { + "type": "object" + }, + "type": "array" + }, + "pull": { + "type": "boolean" + }, + "no-cache": { + "type": "boolean" + }, + "network": { + "type": "string" + }, + "no-cache-filter": { + "items": { + "type": "string" + }, + "type": "array" + }, + "shm-size": { + "type": "string" + }, + "ulimits": { + "items": { + "type": "string" + }, + "type": "array" + }, + "call": { + "type": "string" + }, + "entitlements": { + "items": { + "type": "string" + }, + "type": "array" + }, + "extra-hosts": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Build": { + "properties": { + "context": { + "type": "string", + "description": "Build context" + }, + "add_host": { + "items": { + "type": "string" + }, + "type": "array", + "description": "AddHost add a custom host-to-IP mapping (format: \"host:ip\")" + }, + "allow": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Allow extra privileged entitlement (e.g., \"network.host\", \"security.insecure\")" + }, + "attest": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Attest parameters (format: \"type=sbom,generator=image\")" + }, + "build_arg": { + "items": { + "type": "string" + }, + "type": "array", + "description": "BuildArg set build-time variables" + }, + "build_context": { + "items": { + "type": "string" + }, + "type": "array", + "description": "BuildContext additional build contexts (e.g., name=path)" + }, + "builder": { + "type": "string", + "description": "Builder override the configured builder instance" + }, + "cache_from": { + "type": "string", + "description": "CacheFrom external cache sources (e.g., \"user/app:cache\", \"type=local,src=path/to/dir\")" + }, + "cache_to": { + "type": "string", + "description": "CacheTo cache export destinations (e.g., \"user/app:cache\", \"type=local,dest=path/to/dir\")" + }, + "cgroup_parent": { + "type": "string", + "description": "CGroupParent optional parent cgroup for the container" + }, + "file": { + "type": "string", + "description": "File name of the Dockerfile (default: \"PATH/Dockerfile\")" + }, + "iidfile": { + "type": "string", + "description": "IIDFile write the image ID to the file" + }, + "label": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Label wet metadata for an image" + }, + "load": { + "type": "boolean", + "description": "Load shorthand for \"--output=type=docker\"" + }, + "metadata_file": { + "type": "string", + "description": "MetadataFile write build result metadata to the file" + }, + "network": { + "type": "string", + "description": "Network set the networking mode for the \"RUN\" instructions during build (default \"default\")" + }, + "no_cache": { + "type": "boolean", + "description": "NoCache do not use cache when building the image" + }, + "no_cache_filter": { + "items": { + "type": "string" + }, + "type": "array", + "description": "NoCacheFilter do not cache specified stages" + }, + "output": { + "type": "string", + "description": "Output destination (format: \"type=local,dest=path\")" + }, + "platform": { + "type": "string", + "description": "Platform set target platform for build" + }, + "secret": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Secret to expose to the build (format: \"id=mysecret[,src=/local/secret]\")" + }, + "shm_size": { + "type": "string", + "description": "ShmSize size of \"/dev/shm\"" + }, + "ssh": { + "type": "string", + "description": "SSH agent socket or keys to expose to the build (format: \"default|\u003cid\u003e[=\u003csocket\u003e|\u003ckey\u003e[,\u003ckey\u003e]]\")" + }, + "tag": { + "type": "string", + "description": "Tag name and optionally a tag (format: \"name:tag\")" + }, + "image": { + "type": "string", + "description": "Image name" + }, + "target": { + "type": "string", + "description": "Target set the target build stage to build" + }, + "ulimit": { + "type": "string", + "description": "ULimit ulimit options (default [])" + }, + "dependencies": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Dependencies list of build names defined in the squadron configuration" + }, + "quiet": { + "type": "boolean", + "description": "Suppress the build output and print image ID on succes" + }, + "pull": { + "type": "boolean", + "description": "Always attempt to pull all referenced images" + }, + "push": { + "type": "boolean", + "description": "Shorthand for \"--output=type=registry\"" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Chart": { + "properties": { + "name": { + "type": "string", + "description": "Chart name" + }, + "repository": { + "type": "string", + "description": "Chart repository" + }, + "schema": { + "type": "string", + "description": "Values schema json" + }, + "version": { + "type": "string", + "description": "Chart version" + }, + "alias": { + "type": "string", + "description": "Chart alias" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Config": { + "properties": { + "version": { + "type": "string", + "pattern": "^[0-9]\\.[0-9]$", + "description": "Version of the schema" + }, + "vars": { + "type": "object", + "description": "Global values to be injected into all squadron values" + }, + "global": { + "type": "object", + "description": "Global values to be injected into all squadron values" + }, + "builds": { + "additionalProperties": { + "$ref": "#/$defs/Build" + }, + "type": "object", + "description": "Global builds that can be referenced as dependencies" + }, + "squadron": { + "additionalProperties": { + "additionalProperties": { + "$ref": "#/$defs/Unit" + }, + "type": "object" + }, + "type": "object", + "description": "Squadron definitions" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["version"] + }, + "Tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Unit": { + "properties": { + "name": { + "type": "string", + "description": "Optional release name" + }, + "namespace": { + "type": "string", + "description": "Optional release namespace" + }, + "chart": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/Chart" + } + ], + "description": "Chart settings" + }, + "tags": { + "$ref": "#/$defs/Tags", + "description": "List of tags" + }, + "priority": { + "type": "integer", + "description": "Installation priority, higher comes first" + }, + "extends": { + "type": "string", + "description": "Extend chart values" + }, + "kustomize": { + "type": "string", + "description": "Kustomize files path" + }, + "builds": { + "additionalProperties": { + "$ref": "#/$defs/Build" + }, + "type": "object", + "description": "Map of containers to build" + }, + "bakes": { + "additionalProperties": { + "$ref": "#/$defs/BakeTarget" + }, + "type": "object", + "description": "Map of containers to bakes" + }, + "values": { + "type": "object", + "description": "Chart values" + } + }, + "additionalProperties": false, + "type": "object" + } + } +} From fbd703c0e197fd2a476a4460958e982b77bb3e52 Mon Sep 17 00:00:00 2001 From: Kevin Franklin Kim Date: Thu, 20 Nov 2025 23:33:10 +0100 Subject: [PATCH 5/5] fix: lint issues --- .lefthook.yaml | 8 +- biome.json | 4 + squadron.schema.json | 874 ++++++++++++++++++++++--------------------- 3 files changed, 448 insertions(+), 438 deletions(-) diff --git a/.lefthook.yaml b/.lefthook.yaml index 23516eb..e975496 100644 --- a/.lefthook.yaml +++ b/.lefthook.yaml @@ -14,8 +14,12 @@ pre-commit: exit 1 fi biome: - run: biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} - glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}" + glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc,html,css}" + run: biome format --write {staged_files} + stage_fixed: true + golangci: + glob: "*.go" + run: golangci-lint fmt {staged_files} stage_fixed: true commit-msg: diff --git a/biome.json b/biome.json index 96ffab7..f7784a6 100644 --- a/biome.json +++ b/biome.json @@ -25,5 +25,9 @@ "parser": { "allowComments": true } + }, + "files": { + "ignoreUnknown": true, + "includes": ["**", "!squadron.schema.json"] } } diff --git a/squadron.schema.json b/squadron.schema.json index 2b899df..a400782 100644 --- a/squadron.schema.json +++ b/squadron.schema.json @@ -1,437 +1,439 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/foomo/squadron/refs/heads/main/squadron.schema.json", - "$ref": "#/$defs/Config", - "$defs": { - "BakeTarget": { - "properties": { - "description": { - "type": "string" - }, - "inherits": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Inherits is the only field that cannot be overridden with --set" - }, - "annotations": { - "items": { - "type": "string" - }, - "type": "array" - }, - "attest": { - "items": { - "type": "object" - }, - "type": "array" - }, - "context": { - "type": "string" - }, - "contexts": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "dockerfile": { - "type": "string" - }, - "dockerfile-inline": { - "type": "string" - }, - "args": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "cache-from": { - "items": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "type": "array" - }, - "cache-to": { - "items": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "type": "array" - }, - "target": { - "type": "string" - }, - "secret": { - "items": { - "type": "object" - }, - "type": "array" - }, - "ssh": { - "items": { - "type": "object" - }, - "type": "array" - }, - "platforms": { - "items": { - "type": "string" - }, - "type": "array" - }, - "output": { - "items": { - "type": "object" - }, - "type": "array" - }, - "pull": { - "type": "boolean" - }, - "no-cache": { - "type": "boolean" - }, - "network": { - "type": "string" - }, - "no-cache-filter": { - "items": { - "type": "string" - }, - "type": "array" - }, - "shm-size": { - "type": "string" - }, - "ulimits": { - "items": { - "type": "string" - }, - "type": "array" - }, - "call": { - "type": "string" - }, - "entitlements": { - "items": { - "type": "string" - }, - "type": "array" - }, - "extra-hosts": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - }, - "additionalProperties": false, - "type": "object" - }, - "Build": { - "properties": { - "context": { - "type": "string", - "description": "Build context" - }, - "add_host": { - "items": { - "type": "string" - }, - "type": "array", - "description": "AddHost add a custom host-to-IP mapping (format: \"host:ip\")" - }, - "allow": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Allow extra privileged entitlement (e.g., \"network.host\", \"security.insecure\")" - }, - "attest": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Attest parameters (format: \"type=sbom,generator=image\")" - }, - "build_arg": { - "items": { - "type": "string" - }, - "type": "array", - "description": "BuildArg set build-time variables" - }, - "build_context": { - "items": { - "type": "string" - }, - "type": "array", - "description": "BuildContext additional build contexts (e.g., name=path)" - }, - "builder": { - "type": "string", - "description": "Builder override the configured builder instance" - }, - "cache_from": { - "type": "string", - "description": "CacheFrom external cache sources (e.g., \"user/app:cache\", \"type=local,src=path/to/dir\")" - }, - "cache_to": { - "type": "string", - "description": "CacheTo cache export destinations (e.g., \"user/app:cache\", \"type=local,dest=path/to/dir\")" - }, - "cgroup_parent": { - "type": "string", - "description": "CGroupParent optional parent cgroup for the container" - }, - "file": { - "type": "string", - "description": "File name of the Dockerfile (default: \"PATH/Dockerfile\")" - }, - "iidfile": { - "type": "string", - "description": "IIDFile write the image ID to the file" - }, - "label": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Label wet metadata for an image" - }, - "load": { - "type": "boolean", - "description": "Load shorthand for \"--output=type=docker\"" - }, - "metadata_file": { - "type": "string", - "description": "MetadataFile write build result metadata to the file" - }, - "network": { - "type": "string", - "description": "Network set the networking mode for the \"RUN\" instructions during build (default \"default\")" - }, - "no_cache": { - "type": "boolean", - "description": "NoCache do not use cache when building the image" - }, - "no_cache_filter": { - "items": { - "type": "string" - }, - "type": "array", - "description": "NoCacheFilter do not cache specified stages" - }, - "output": { - "type": "string", - "description": "Output destination (format: \"type=local,dest=path\")" - }, - "platform": { - "type": "string", - "description": "Platform set target platform for build" - }, - "secret": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Secret to expose to the build (format: \"id=mysecret[,src=/local/secret]\")" - }, - "shm_size": { - "type": "string", - "description": "ShmSize size of \"/dev/shm\"" - }, - "ssh": { - "type": "string", - "description": "SSH agent socket or keys to expose to the build (format: \"default|\u003cid\u003e[=\u003csocket\u003e|\u003ckey\u003e[,\u003ckey\u003e]]\")" - }, - "tag": { - "type": "string", - "description": "Tag name and optionally a tag (format: \"name:tag\")" - }, - "image": { - "type": "string", - "description": "Image name" - }, - "target": { - "type": "string", - "description": "Target set the target build stage to build" - }, - "ulimit": { - "type": "string", - "description": "ULimit ulimit options (default [])" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Dependencies list of build names defined in the squadron configuration" - }, - "quiet": { - "type": "boolean", - "description": "Suppress the build output and print image ID on succes" - }, - "pull": { - "type": "boolean", - "description": "Always attempt to pull all referenced images" - }, - "push": { - "type": "boolean", - "description": "Shorthand for \"--output=type=registry\"" - } - }, - "additionalProperties": false, - "type": "object" - }, - "Chart": { - "properties": { - "name": { - "type": "string", - "description": "Chart name" - }, - "repository": { - "type": "string", - "description": "Chart repository" - }, - "schema": { - "type": "string", - "description": "Values schema json" - }, - "version": { - "type": "string", - "description": "Chart version" - }, - "alias": { - "type": "string", - "description": "Chart alias" - } - }, - "additionalProperties": false, - "type": "object" - }, - "Config": { - "properties": { - "version": { - "type": "string", - "pattern": "^[0-9]\\.[0-9]$", - "description": "Version of the schema" - }, - "vars": { - "type": "object", - "description": "Global values to be injected into all squadron values" - }, - "global": { - "type": "object", - "description": "Global values to be injected into all squadron values" - }, - "builds": { - "additionalProperties": { - "$ref": "#/$defs/Build" - }, - "type": "object", - "description": "Global builds that can be referenced as dependencies" - }, - "squadron": { - "additionalProperties": { - "additionalProperties": { - "$ref": "#/$defs/Unit" - }, - "type": "object" - }, - "type": "object", - "description": "Squadron definitions" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["version"] - }, - "Tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "Unit": { - "properties": { - "name": { - "type": "string", - "description": "Optional release name" - }, - "namespace": { - "type": "string", - "description": "Optional release namespace" - }, - "chart": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/$defs/Chart" - } - ], - "description": "Chart settings" - }, - "tags": { - "$ref": "#/$defs/Tags", - "description": "List of tags" - }, - "priority": { - "type": "integer", - "description": "Installation priority, higher comes first" - }, - "extends": { - "type": "string", - "description": "Extend chart values" - }, - "kustomize": { - "type": "string", - "description": "Kustomize files path" - }, - "builds": { - "additionalProperties": { - "$ref": "#/$defs/Build" - }, - "type": "object", - "description": "Map of containers to build" - }, - "bakes": { - "additionalProperties": { - "$ref": "#/$defs/BakeTarget" - }, - "type": "object", - "description": "Map of containers to bakes" - }, - "values": { - "type": "object", - "description": "Chart values" - } - }, - "additionalProperties": false, - "type": "object" - } - } -} + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/foomo/squadron/refs/heads/main/squadron.schema.json", + "$ref": "#/$defs/Config", + "$defs": { + "BakeTarget": { + "properties": { + "description": { + "type": "string" + }, + "inherits": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Inherits is the only field that cannot be overridden with --set" + }, + "annotations": { + "items": { + "type": "string" + }, + "type": "array" + }, + "attest": { + "items": { + "type": "object" + }, + "type": "array" + }, + "context": { + "type": "string" + }, + "contexts": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "dockerfile": { + "type": "string" + }, + "dockerfile-inline": { + "type": "string" + }, + "args": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "cache-from": { + "items": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": "array" + }, + "cache-to": { + "items": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": "array" + }, + "target": { + "type": "string" + }, + "secret": { + "items": { + "type": "object" + }, + "type": "array" + }, + "ssh": { + "items": { + "type": "object" + }, + "type": "array" + }, + "platforms": { + "items": { + "type": "string" + }, + "type": "array" + }, + "output": { + "items": { + "type": "object" + }, + "type": "array" + }, + "pull": { + "type": "boolean" + }, + "no-cache": { + "type": "boolean" + }, + "network": { + "type": "string" + }, + "no-cache-filter": { + "items": { + "type": "string" + }, + "type": "array" + }, + "shm-size": { + "type": "string" + }, + "ulimits": { + "items": { + "type": "string" + }, + "type": "array" + }, + "call": { + "type": "string" + }, + "entitlements": { + "items": { + "type": "string" + }, + "type": "array" + }, + "extra-hosts": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Build": { + "properties": { + "context": { + "type": "string", + "description": "Build context" + }, + "add_host": { + "items": { + "type": "string" + }, + "type": "array", + "description": "AddHost add a custom host-to-IP mapping (format: \"host:ip\")" + }, + "allow": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Allow extra privileged entitlement (e.g., \"network.host\", \"security.insecure\")" + }, + "attest": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Attest parameters (format: \"type=sbom,generator=image\")" + }, + "build_arg": { + "items": { + "type": "string" + }, + "type": "array", + "description": "BuildArg set build-time variables" + }, + "build_context": { + "items": { + "type": "string" + }, + "type": "array", + "description": "BuildContext additional build contexts (e.g., name=path)" + }, + "builder": { + "type": "string", + "description": "Builder override the configured builder instance" + }, + "cache_from": { + "type": "string", + "description": "CacheFrom external cache sources (e.g., \"user/app:cache\", \"type=local,src=path/to/dir\")" + }, + "cache_to": { + "type": "string", + "description": "CacheTo cache export destinations (e.g., \"user/app:cache\", \"type=local,dest=path/to/dir\")" + }, + "cgroup_parent": { + "type": "string", + "description": "CGroupParent optional parent cgroup for the container" + }, + "file": { + "type": "string", + "description": "File name of the Dockerfile (default: \"PATH/Dockerfile\")" + }, + "iidfile": { + "type": "string", + "description": "IIDFile write the image ID to the file" + }, + "label": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Label wet metadata for an image" + }, + "load": { + "type": "boolean", + "description": "Load shorthand for \"--output=type=docker\"" + }, + "metadata_file": { + "type": "string", + "description": "MetadataFile write build result metadata to the file" + }, + "network": { + "type": "string", + "description": "Network set the networking mode for the \"RUN\" instructions during build (default \"default\")" + }, + "no_cache": { + "type": "boolean", + "description": "NoCache do not use cache when building the image" + }, + "no_cache_filter": { + "items": { + "type": "string" + }, + "type": "array", + "description": "NoCacheFilter do not cache specified stages" + }, + "output": { + "type": "string", + "description": "Output destination (format: \"type=local,dest=path\")" + }, + "platform": { + "type": "string", + "description": "Platform set target platform for build" + }, + "secret": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Secret to expose to the build (format: \"id=mysecret[,src=/local/secret]\")" + }, + "shm_size": { + "type": "string", + "description": "ShmSize size of \"/dev/shm\"" + }, + "ssh": { + "type": "string", + "description": "SSH agent socket or keys to expose to the build (format: \"default|\u003cid\u003e[=\u003csocket\u003e|\u003ckey\u003e[,\u003ckey\u003e]]\")" + }, + "tag": { + "type": "string", + "description": "Tag name and optionally a tag (format: \"name:tag\")" + }, + "image": { + "type": "string", + "description": "Image name" + }, + "target": { + "type": "string", + "description": "Target set the target build stage to build" + }, + "ulimit": { + "type": "string", + "description": "ULimit ulimit options (default [])" + }, + "dependencies": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Dependencies list of build names defined in the squadron configuration" + }, + "quiet": { + "type": "boolean", + "description": "Suppress the build output and print image ID on succes" + }, + "pull": { + "type": "boolean", + "description": "Always attempt to pull all referenced images" + }, + "push": { + "type": "boolean", + "description": "Shorthand for \"--output=type=registry\"" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Chart": { + "properties": { + "name": { + "type": "string", + "description": "Chart name" + }, + "repository": { + "type": "string", + "description": "Chart repository" + }, + "schema": { + "type": "string", + "description": "Values schema json" + }, + "version": { + "type": "string", + "description": "Chart version" + }, + "alias": { + "type": "string", + "description": "Chart alias" + } + }, + "additionalProperties": false, + "type": "object" + }, + "Config": { + "properties": { + "version": { + "type": "string", + "pattern": "^[0-9]\\.[0-9]$", + "description": "Version of the schema" + }, + "vars": { + "type": "object", + "description": "Global values to be injected into all squadron values" + }, + "global": { + "type": "object", + "description": "Global values to be injected into all squadron values" + }, + "builds": { + "additionalProperties": { + "$ref": "#/$defs/Build" + }, + "type": "object", + "description": "Global builds that can be referenced as dependencies" + }, + "squadron": { + "additionalProperties": { + "additionalProperties": { + "$ref": "#/$defs/Unit" + }, + "type": "object" + }, + "type": "object", + "description": "Squadron definitions" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "version" + ] + }, + "Tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "Unit": { + "properties": { + "name": { + "type": "string", + "description": "Optional release name" + }, + "namespace": { + "type": "string", + "description": "Optional release namespace" + }, + "chart": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/Chart" + } + ], + "description": "Chart settings" + }, + "tags": { + "$ref": "#/$defs/Tags", + "description": "List of tags" + }, + "priority": { + "type": "integer", + "description": "Installation priority, higher comes first" + }, + "extends": { + "type": "string", + "description": "Extend chart values" + }, + "kustomize": { + "type": "string", + "description": "Kustomize files path" + }, + "builds": { + "additionalProperties": { + "$ref": "#/$defs/Build" + }, + "type": "object", + "description": "Map of containers to build" + }, + "bakes": { + "additionalProperties": { + "$ref": "#/$defs/BakeTarget" + }, + "type": "object", + "description": "Map of containers to bakes" + }, + "values": { + "type": "object", + "description": "Chart values" + } + }, + "additionalProperties": false, + "type": "object" + } + } +} \ No newline at end of file