Skip to content

Commit

Permalink
Add security-validator branch to tests triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
SylwiaBrant authored Jun 8, 2021
1 parent 38fcdf5 commit e762957
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/auto-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion pkg/client/jenkins.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net/http/cookiejar"
"regexp"
"strings"
"time"

"github.com/bndr/gojenkins"
"github.com/pkg/errors"
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit e762957

Please sign in to comment.