From 813fc0322a2ac016103d29354506b094e532068f Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 19 Nov 2024 20:48:36 +0100 Subject: [PATCH] sort container definitons --- pipeline/frontend/yaml/types/container.go | 39 +++++++++++++---------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/pipeline/frontend/yaml/types/container.go b/pipeline/frontend/yaml/types/container.go index d05c5c972..d68a02b76 100644 --- a/pipeline/frontend/yaml/types/container.go +++ b/pipeline/frontend/yaml/types/container.go @@ -32,22 +32,29 @@ type ( // Container defines a container. Container struct { - BackendOptions map[string]any `yaml:"backend_options,omitempty"` - Commands base.StringOrSlice `yaml:"commands,omitempty"` - Entrypoint base.StringOrSlice `yaml:"entrypoint,omitempty"` - Detached bool `yaml:"detach,omitempty"` - Directory string `yaml:"directory,omitempty"` - Failure string `yaml:"failure,omitempty"` - Image string `yaml:"image,omitempty"` - Name string `yaml:"name,omitempty"` - Pull bool `yaml:"pull,omitempty"` - Settings map[string]any `yaml:"settings"` - Volumes Volumes `yaml:"volumes,omitempty"` - When constraint.When `yaml:"when,omitempty"` - Ports []string `yaml:"ports,omitempty"` - DependsOn base.StringOrSlice `yaml:"depends_on,omitempty"` - DNS base.StringOrSlice `yaml:"dns,omitempty"` - DNSSearch base.StringOrSlice `yaml:"dns_search,omitempty"` + // common + Name string `yaml:"name,omitempty"` + Image string `yaml:"image,omitempty"` + Pull bool `yaml:"pull,omitempty"` + Commands base.StringOrSlice `yaml:"commands,omitempty"` + Entrypoint base.StringOrSlice `yaml:"entrypoint,omitempty"` + Directory string `yaml:"directory,omitempty"` + Settings map[string]any `yaml:"settings"` + // flow control + DependsOn base.StringOrSlice `yaml:"depends_on,omitempty"` + When constraint.When `yaml:"when,omitempty"` + Failure string `yaml:"failure,omitempty"` + Detached bool `yaml:"detach,omitempty"` + // state + Volumes Volumes `yaml:"volumes,omitempty"` + // network + Ports []string `yaml:"ports,omitempty"` + DNS base.StringOrSlice `yaml:"dns,omitempty"` + DNSSearch base.StringOrSlice `yaml:"dns_search,omitempty"` + // backend specific + BackendOptions map[string]any `yaml:"backend_options,omitempty"` + + // ACTIVE DEVELOPMENT BELOW // TODO: remove base.EnvironmentMap and use map[string]any after v3.0.0 release Environment base.EnvironmentMap `yaml:"environment,omitempty"`