Add security-validator branch to tests triggers

This commit is contained in:
SylwiaBrant 2021-06-08 09:38:47 +02:00 committed by GitHub
parent 38fcdf5d37
commit e762957cc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -3,10 +3,12 @@ on:
push:
branches:
- master
- security-validator
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
branches:
- master
- security-validator
jobs:
run-tests:
if: github.event.pull_request.draft == false

View File

@ -6,6 +6,7 @@ import (
"net/http/cookiejar"
"regexp"
"strings"
"time"
"github.com/bndr/gojenkins"
"github.com/pkg/errors"
@ -156,7 +157,10 @@ func newClient(url, userName, passwordOrToken string) (Jenkins, error) {
return nil, errors.Wrap(err, "couldn't create a cookie jar")
}
httpClient := &http.Client{Jar: jar}
httpClient := &http.Client{
Jar: jar,
Timeout: 10 * time.Second,
}
if len(userName) > 0 && len(passwordOrToken) > 0 {
basicAuth = &gojenkins.BasicAuth{Username: userName, Password: passwordOrToken}