You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-23 21:44:44 +02:00
@@ -31,12 +31,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// StepLabelLegacy is the legacy label name from before the introduction of the woodpecker-ci.org namespace.
|
||||
// This will be removed in the future.
|
||||
StepLabelLegacy = "step"
|
||||
StepLabel = "woodpecker-ci.org/step"
|
||||
podPrefix = "wp-"
|
||||
defaultFSGroup int64 = 1000
|
||||
StepLabel = "step"
|
||||
podPrefix = "wp-"
|
||||
defaultFSGroup int64 = 1000
|
||||
)
|
||||
|
||||
func mkPod(step *types.Step, config *config, podName, goos string, options BackendOptions) (*v1.Pod, error) {
|
||||
@@ -118,10 +115,6 @@ func podLabels(step *types.Step, config *config, options BackendOptions) (map[st
|
||||
if step.Type == types.StepTypeService {
|
||||
labels[ServiceLabel], _ = serviceName(step)
|
||||
}
|
||||
labels[StepLabelLegacy], err = stepLabel(step)
|
||||
if err != nil {
|
||||
return labels, err
|
||||
}
|
||||
labels[StepLabel], err = stepLabel(step)
|
||||
if err != nil {
|
||||
return labels, err
|
||||
|
||||
@@ -72,8 +72,7 @@ func TestTinyPod(t *testing.T) {
|
||||
"namespace": "woodpecker",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"step": "build-via-gradle",
|
||||
"woodpecker-ci.org/step": "build-via-gradle"
|
||||
"step": "build-via-gradle"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
@@ -154,8 +153,7 @@ func TestFullPod(t *testing.T) {
|
||||
"labels": {
|
||||
"app": "test",
|
||||
"part-of": "woodpecker-ci",
|
||||
"step": "go-test",
|
||||
"woodpecker-ci.org/step": "go-test"
|
||||
"step": "go-test"
|
||||
},
|
||||
"annotations": {
|
||||
"apps.kubernetes.io/pod-index": "0",
|
||||
@@ -449,8 +447,7 @@ func TestScratchPod(t *testing.T) {
|
||||
"namespace": "woodpecker",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"step": "curl-google",
|
||||
"woodpecker-ci.org/step": "curl-google"
|
||||
"step": "curl-google"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
@@ -495,8 +492,7 @@ func TestSecrets(t *testing.T) {
|
||||
"namespace": "woodpecker",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"step": "test-secrets",
|
||||
"woodpecker-ci.org/step": "test-secrets"
|
||||
"step": "test-secrets"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
|
||||
@@ -258,10 +258,6 @@ func registrySecretLabels(step *types.Step) (map[string]string, error) {
|
||||
if step.Type == types.StepTypeService {
|
||||
labels[ServiceLabel], _ = serviceName(step)
|
||||
}
|
||||
labels[StepLabelLegacy], err = stepLabel(step)
|
||||
if err != nil {
|
||||
return labels, err
|
||||
}
|
||||
labels[StepLabel], err = stepLabel(step)
|
||||
if err != nil {
|
||||
return labels, err
|
||||
|
||||
@@ -212,8 +212,7 @@ func TestRegistrySecret(t *testing.T) {
|
||||
"namespace": "woodpecker",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"step": "go-test",
|
||||
"woodpecker-ci.org/step": "go-test"
|
||||
"step": "go-test"
|
||||
}
|
||||
},
|
||||
"type": "kubernetes.io/dockerconfigjson",
|
||||
|
||||
Reference in New Issue
Block a user