mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
use 5 last chars of uuid
This commit is contained in:
@@ -70,7 +70,7 @@ func (e *docker) toConfig(step *types.Step, options BackendOptions) *container.C
|
||||
}
|
||||
|
||||
func toContainerName(step *types.Step, workflowName string) string {
|
||||
return "wp_" + workflowName + "-" + step.Name + "-" + step.UUID[:5]
|
||||
return "wp_" + workflowName + "-" + step.Name + "-" + step.UUID[len(step.UUID)-5:]
|
||||
}
|
||||
|
||||
// returns a container host configuration.
|
||||
|
||||
@@ -77,7 +77,7 @@ func stepToPodName(step *types.Step, workflowName string) (name string, err erro
|
||||
}
|
||||
|
||||
func podName(step *types.Step, workflowName string) (string, error) {
|
||||
return dnsName(podPrefix + workflowName + "-" + step.Name + "-" + step.UUID[:5])
|
||||
return dnsName(podPrefix + workflowName + "-" + step.Name + "-" + step.UUID[len(step.UUID)-5:])
|
||||
}
|
||||
|
||||
func podMeta(step *types.Step, config *config, options BackendOptions, podName, workflowName string) (meta_v1.ObjectMeta, error) {
|
||||
|
||||
@@ -63,7 +63,7 @@ func mkService(step *types.Step, config *config, workflowName string) (*v1.Servi
|
||||
}
|
||||
|
||||
func serviceName(step *types.Step, workflowName string) (string, error) {
|
||||
return dnsName(servicePrefix + workflowName + "-" + step.Name + "-" + step.UUID[:5])
|
||||
return dnsName(servicePrefix + workflowName + "-" + step.Name + "-" + step.UUID[len(step.UUID)-5:])
|
||||
}
|
||||
|
||||
func servicePort(port types.Port) v1.ServicePort {
|
||||
|
||||
Reference in New Issue
Block a user