Quick fix ports in jenkins.go

This bug makes it impossible to use NodePort instead of port.
This commit is contained in:
Jakub Al-Khalili 2019-11-22 15:40:00 +01:00 committed by Paweł Prażak
parent a612939f33
commit b75e8de596
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ func (j JenkinsAPIConnectionSettings) BuildJenkinsAPIUrl(serviceName string, ser
// Validate validates jenkins API connection settings
func (j JenkinsAPIConnectionSettings) Validate() error {
if j.Port >= 0 && j.UseNodePort {
if j.Port > 0 && j.UseNodePort {
return errors.New("can't use service port and nodePort both. Please use port or nodePort")
}