1
0
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:
Harri Avellan
2025-09-28 22:56:43 +03:00
committed by GitHub
parent d894d3a15b
commit 0fc615c178
4 changed files with 46 additions and 2 deletions

View File

@@ -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))