mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-04 00:06:10 +00:00
Use step type to detect services in Kubernetes backend (#3141)
and use the correct name for tail log --------- Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
@@ -66,6 +66,13 @@ func mkPod(namespace, name, image, workDir, goos, serviceAccountName string,
|
||||
return pod, nil
|
||||
}
|
||||
|
||||
func stepToPodName(step *types.Step) (name string, err error) {
|
||||
if step.Type == types.StepTypeService {
|
||||
return serviceName(step)
|
||||
}
|
||||
return podName(step)
|
||||
}
|
||||
|
||||
func podName(step *types.Step) (string, error) {
|
||||
return dnsName(step.Name)
|
||||
}
|
||||
|
Reference in New Issue
Block a user