refactor: use camelCase

This commit is contained in:
Kevin Franklin Kim
2025-11-28 06:46:30 +01:00
parent 5bddd36df5
commit 0a6b5f993d
11 changed files with 46 additions and 40 deletions
+7 -7
View File
@@ -8,26 +8,26 @@ type BakeTarget struct {
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"`
DockerfileInline string `json:"dockerfileInline,omitempty" yaml:"dockerfileInline,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"`
CacheFrom []map[string]string `json:"cacheFrom,omitempty" yaml:"cacheFrom,omitempty" hcl:"cache-from,optional"`
CacheTo []map[string]string `json:"cacheTo,omitempty" yaml:"cacheTo,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"`
NoCache bool `json:"noCache,omitempty" yaml:"noCache,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"`
NoCacheFilter []string `json:"noCacheFilter,omitempty" yaml:"noCacheFilter,omitempty" hcl:"no-cache-filter,optional"`
ShmSize string `json:"shmSize,omitempty" yaml:"shmSize,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"`
ExtraHosts map[string]string `json:"extraHosts,omitempty" yaml:"extraHosts,omitempty" hcl:"extra-hosts,optional"`
// Inherits is the only field that cannot be overridden with --set
Inherits []string `json:"inherits,omitempty" yaml:"inherits,omitempty" hcl:"inherits,optional"`
// NOTE: use typed once it can be rendered as slice
+10 -10
View File
@@ -17,7 +17,7 @@ type Build struct {
Dependencies []string `json:"dependencies,omitempty" yaml:"dependencies,omitempty"`
// AddHost add a custom host-to-IP mapping (format: "host:ip")
AddHost []string `json:"add_host,omitempty" yaml:"add_host,omitempty"`
AddHost []string `json:"addHost,omitempty" yaml:"addHost,omitempty"`
// Allow extra privileged entitlement (e.g., "network.host", "security.insecure")
Allow []string `json:"allow,omitempty" yaml:"allow,omitempty"`
// Add annotation to the image
@@ -25,19 +25,19 @@ type Build struct {
// Attest parameters (format: "type=sbom,generator=image")
Attest []string `json:"attest,omitempty" yaml:"attest,omitempty"`
// BuildArg set build-time variables
BuildArg []string `json:"build_arg,omitempty" yaml:"build_arg,omitempty"`
BuildArg []string `json:"buildArg,omitempty" yaml:"buildArg,omitempty"`
// BuildContext additional build contexts (e.g., name=path)
BuildContext []string `json:"build_context,omitempty" yaml:"build_context,omitempty"`
BuildContext []string `json:"buildContext,omitempty" yaml:"buildContext,omitempty"`
// Builder override the configured builder instance
Builder string `json:"builder,omitempty" yaml:"builder,omitempty"`
// CacheFrom external cache sources (e.g., "user/app:cache", "type=local,src=path/to/dir")
CacheFrom []string `json:"cache_from,omitempty" yaml:"cache_from,omitempty"`
CacheFrom []string `json:"cacheFrom,omitempty" yaml:"cacheFrom,omitempty"`
// CacheTo cache export destinations (e.g., "user/app:cache", "type=local,dest=path/to/dir")
CacheTo []string `json:"cache_to,omitempty" yaml:"cache_to,omitempty"`
CacheTo []string `json:"cacheTo,omitempty" yaml:"cacheTo,omitempty"`
// Set method for evaluating build ("check", "outline", "targets") (default "build")
Call string `json:"call,omitempty" yaml:"call,omitempty"`
// CGroupParent optional parent cgroup for the container
CGroupParent string `json:"cgroup_parent,omitempty" yaml:"cgroup_parent,omitempty"`
CGroupParent string `json:"cGroupParent,omitempty" yaml:"cGroupParent,omitempty"`
// Shorthand for "--call=check"
Check bool `json:"check,omitempty" yaml:"check,omitempty"`
// Enable debug logging
@@ -51,13 +51,13 @@ type Build struct {
// Load shorthand for "--output=type=docker"
Load bool `json:"load,omitempty" yaml:"load,omitempty"`
// MetadataFile write build result metadata to the file
MetadataFile string `json:"metadata_file,omitempty" yaml:"metadata_file,omitempty"`
MetadataFile string `json:"metadataFile,omitempty" yaml:"metadataFile,omitempty"`
// Network set the networking mode for the "RUN" instructions during build (default "default")
Network string `json:"network,omitempty" yaml:"network,omitempty"`
// NoCache do not use cache when building the image
NoCache bool `json:"no_cache,omitempty" yaml:"no_cache,omitempty"`
NoCache bool `json:"noCache,omitempty" yaml:"noCache,omitempty"`
// NoCacheFilter do not cache specified stages
NoCacheFilter []string `json:"no_cache_filter,omitempty" yaml:"no_cache_filter,omitempty"`
NoCacheFilter []string `json:"noCacheFilter,omitempty" yaml:"noCacheFilter,omitempty"`
// Output destination (format: "type=local,dest=path")
Output []string `json:"output,omitempty" yaml:"output,omitempty"`
// Platform set target platform for build
@@ -77,7 +77,7 @@ type Build struct {
// Secret to expose to the build (format: "id=mysecret[,src=/local/secret]")
Secret []string `json:"secret,omitempty" yaml:"secret,omitempty"`
// ShmSize size of "/dev/shm"
ShmSize string `json:"shm_size,omitempty" yaml:"shm_size,omitempty"`
ShmSize string `json:"shmSize,omitempty" yaml:"shmSize,omitempty"`
// SSH agent socket or keys to expose to the build (format: "default|<id>[=<socket>|<key>[,<key>]]")
SSH []string `json:"ssh,omitempty" yaml:"ssh,omitempty"`
// Tag name and optionally a tag (format: "name:tag")
+17 -17
View File
@@ -32,7 +32,7 @@
"dockerfile": {
"type": "string"
},
"dockerfile-inline": {
"dockerfileInline": {
"type": "string"
},
"args": {
@@ -53,7 +53,7 @@
},
"type": "array"
},
"cache-from": {
"cacheFrom": {
"items": {
"additionalProperties": {
"type": "string"
@@ -62,7 +62,7 @@
},
"type": "array"
},
"cache-to": {
"cacheTo": {
"items": {
"additionalProperties": {
"type": "string"
@@ -101,19 +101,19 @@
"pull": {
"type": "boolean"
},
"no-cache": {
"noCache": {
"type": "boolean"
},
"network": {
"type": "string"
},
"no-cache-filter": {
"noCacheFilter": {
"items": {
"type": "string"
},
"type": "array"
},
"shm-size": {
"shmSize": {
"type": "string"
},
"ulimits": {
@@ -131,7 +131,7 @@
},
"type": "array"
},
"extra-hosts": {
"extraHosts": {
"additionalProperties": {
"type": "string"
},
@@ -161,7 +161,7 @@
"type": "array",
"description": "Dependencies list of build names defined in the squadron configuration"
},
"add_host": {
"addHost": {
"items": {
"type": "string"
},
@@ -189,14 +189,14 @@
"type": "array",
"description": "Attest parameters (format: \"type=sbom,generator=image\")"
},
"build_arg": {
"buildArg": {
"items": {
"type": "string"
},
"type": "array",
"description": "BuildArg set build-time variables"
},
"build_context": {
"buildContext": {
"items": {
"type": "string"
},
@@ -207,14 +207,14 @@
"type": "string",
"description": "Builder override the configured builder instance"
},
"cache_from": {
"cacheFrom": {
"items": {
"type": "string"
},
"type": "array",
"description": "CacheFrom external cache sources (e.g., \"user/app:cache\", \"type=local,src=path/to/dir\")"
},
"cache_to": {
"cacheTo": {
"items": {
"type": "string"
},
@@ -225,7 +225,7 @@
"type": "string",
"description": "Set method for evaluating build (\"check\", \"outline\", \"targets\") (default \"build\")"
},
"cgroup_parent": {
"cGroupParent": {
"type": "string",
"description": "CGroupParent optional parent cgroup for the container"
},
@@ -256,7 +256,7 @@
"type": "boolean",
"description": "Load shorthand for \"--output=type=docker\""
},
"metadata_file": {
"metadataFile": {
"type": "string",
"description": "MetadataFile write build result metadata to the file"
},
@@ -264,11 +264,11 @@
"type": "string",
"description": "Network set the networking mode for the \"RUN\" instructions during build (default \"default\")"
},
"no_cache": {
"noCache": {
"type": "boolean",
"description": "NoCache do not use cache when building the image"
},
"no_cache_filter": {
"noCacheFilter": {
"items": {
"type": "string"
},
@@ -320,7 +320,7 @@
"type": "array",
"description": "Secret to expose to the build (format: \"id=mysecret[,src=/local/secret]\")"
},
"shm_size": {
"shmSize": {
"type": "string",
"description": "ShmSize size of \"/dev/shm\""
},
+2 -1
View File
@@ -17,5 +17,6 @@ target "squadron-storefinder-backend-default" {
# test
# test
}
tags = ["storefinder/backend:${TAG}"]
tags = ["storefinder/backend:${TAG}"]
no-cache-filter = ["nocache"]
}
+2
View File
@@ -16,3 +16,5 @@ squadron:
default:
tags:
- storefinder/backend:${TAG}
noCacheFilter:
- nocache
+2
View File
@@ -16,3 +16,5 @@ squadron:
default:
tags:
- storefinder/backend:${TAG}
noCacheFilter:
- nocache
+1
View File
@@ -14,4 +14,5 @@ squadron:
bakes:
default:
tags: [ 'storefinder/backend:${TAG}' ]
noCacheFilter: [ nocache ]
+1 -1
View File
@@ -8,7 +8,7 @@ squadron:
version: 0.0.1
builds:
default:
build_arg:
buildArg:
- foo=foo
- bar=bar
- bar=baz
+1 -1
View File
@@ -8,7 +8,7 @@ squadron:
version: 0.0.1
builds:
default:
build_arg:
buildArg:
- foo=foo
- bar=bar
- bar=baz
+1 -1
View File
@@ -6,7 +6,7 @@ squadron:
builds:
default:
# append new element to array
build_arg:
buildArg:
- "bar=baz"
- "baz=baz"
# override backend
+2 -2
View File
@@ -8,7 +8,7 @@ squadron:
default:
tag: [ storefinder/frontend:latest ]
file: Dockerfile
build_arg:
buildArg:
- "foo=foo"
- "bar=bar"
values:
@@ -21,7 +21,7 @@ squadron:
default:
tag: [ storefinder/backend:latest ]
file: Dockerfile
build_arg:
buildArg:
- "foo=foo"
- "bar=bar"
values: