From f81b447638c364eedc5d6ee56dfa2acdee65c5b1 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Mon, 5 Jun 2023 17:30:32 +0200 Subject: [PATCH] remove undocumented docker specific option (#1825) --- pipeline/backend/docker/convert.go | 1 - pipeline/backend/types/step.go | 1 - pipeline/frontend/yaml/compiler/convert.go | 1 - pipeline/frontend/yaml/container.go | 1 - pipeline/frontend/yaml/container_test.go | 4 ---- 5 files changed, 8 deletions(-) diff --git a/pipeline/backend/docker/convert.go b/pipeline/backend/docker/convert.go index c5e715c3d..0431f1ec7 100644 --- a/pipeline/backend/docker/convert.go +++ b/pipeline/backend/docker/convert.go @@ -30,7 +30,6 @@ import ( func toConfig(step *types.Step) *container.Config { config := &container.Config{ Image: step.Image, - Labels: step.Labels, WorkingDir: step.WorkingDir, AttachStdout: true, AttachStderr: true, diff --git a/pipeline/backend/types/step.go b/pipeline/backend/types/step.go index de458ad9b..ec1d0551a 100644 --- a/pipeline/backend/types/step.go +++ b/pipeline/backend/types/step.go @@ -10,7 +10,6 @@ type Step struct { Privileged bool `json:"privileged,omitempty"` WorkingDir string `json:"working_dir,omitempty"` Environment map[string]string `json:"environment,omitempty"` - Labels map[string]string `json:"labels,omitempty"` Entrypoint []string `json:"entrypoint,omitempty"` Commands []string `json:"commands,omitempty"` ExtraHosts []string `json:"extra_hosts,omitempty"` diff --git a/pipeline/frontend/yaml/compiler/convert.go b/pipeline/frontend/yaml/compiler/convert.go index ba52d10e4..b4c910605 100644 --- a/pipeline/frontend/yaml/compiler/convert.go +++ b/pipeline/frontend/yaml/compiler/convert.go @@ -164,7 +164,6 @@ func (c *Compiler) createProcess(name string, container *yaml.Container, section Privileged: privileged, WorkingDir: workingdir, Environment: environment, - Labels: container.Labels, Commands: container.Commands, ExtraHosts: container.ExtraHosts, Volumes: volumes, diff --git a/pipeline/frontend/yaml/container.go b/pipeline/frontend/yaml/container.go index bcc835bf4..54848f69a 100644 --- a/pipeline/frontend/yaml/container.go +++ b/pipeline/frontend/yaml/container.go @@ -59,7 +59,6 @@ type ( Image string `yaml:"image,omitempty"` Failure string `yaml:"failure,omitempty"` Isolation string `yaml:"isolation,omitempty"` - Labels types.SliceorMap `yaml:"labels,omitempty"` MemLimit types.MemStringorInt `yaml:"mem_limit,omitempty"` MemSwapLimit types.MemStringorInt `yaml:"memswap_limit,omitempty"` MemSwappiness types.MemStringorInt `yaml:"mem_swappiness,omitempty"` diff --git a/pipeline/frontend/yaml/container_test.go b/pipeline/frontend/yaml/container_test.go index 2a22fa964..916058d1b 100644 --- a/pipeline/frontend/yaml/container_test.go +++ b/pipeline/frontend/yaml/container_test.go @@ -44,9 +44,6 @@ networks: - other-network pull: true privileged: true -labels: - com.example.type: build - com.example.team: frontend shm_size: 1kb mem_limit: 1kb memswap_limit: 1kb @@ -87,7 +84,6 @@ func TestUnmarshalContainer(t *testing.T) { ExtraHosts: []string{"somehost:162.242.195.82", "otherhost:50.31.209.229"}, Image: "golang:latest", Isolation: "hyperv", - Labels: types.SliceorMap{"com.example.type": "build", "com.example.team": "frontend"}, MemLimit: types.MemStringorInt(1024), MemSwapLimit: types.MemStringorInt(1024), MemSwappiness: types.MemStringorInt(1024),