mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-02 00:58:22 +00:00
Tag pipeline with source information (#4771)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
@@ -31,9 +31,12 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
StepLabel = "step"
|
||||
podPrefix = "wp-"
|
||||
defaultFSGroup int64 = 1000
|
||||
// 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
|
||||
)
|
||||
|
||||
func mkPod(step *types.Step, config *config, podName, goos string, options BackendOptions) (*v1.Pod, error) {
|
||||
@@ -115,6 +118,10 @@ 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
|
||||
|
Reference in New Issue
Block a user