You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-23 21:44:44 +02:00
Trace errors during SetupWorkflow, make service step setup errors visible to user (#5559)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
This commit is contained in:
@@ -43,6 +43,10 @@ func mkService(step *types.Step, config *config) (*v1.Service, error) {
|
||||
ServiceLabel: name,
|
||||
}
|
||||
|
||||
if len(step.Ports) == 0 {
|
||||
return nil, fmt.Errorf("kubernetes backend requires explicitly exposed ports for service steps, add 'ports' configuration to step '%s'", step.Name)
|
||||
}
|
||||
|
||||
var svcPorts []v1.ServicePort
|
||||
for _, port := range step.Ports {
|
||||
svcPorts = append(svcPorts, servicePort(port))
|
||||
|
||||
Reference in New Issue
Block a user