Add security-validator branch to tests triggers
This commit is contained in:
		
							parent
							
								
									38fcdf5d37
								
							
						
					
					
						commit
						e762957cc1
					
				|  | @ -3,10 +3,12 @@ on: | ||||||
|   push: |   push: | ||||||
|     branches: |     branches: | ||||||
|       - master |       - master | ||||||
|  |       - security-validator | ||||||
|   pull_request: |   pull_request: | ||||||
|     types: [opened, synchronize, ready_for_review, reopened] |     types: [opened, synchronize, ready_for_review, reopened] | ||||||
|     branches: |     branches: | ||||||
|       - master |       - master | ||||||
|  |       - security-validator | ||||||
| jobs: | jobs: | ||||||
|   run-tests: |   run-tests: | ||||||
|     if: github.event.pull_request.draft == false |     if: github.event.pull_request.draft == false | ||||||
|  |  | ||||||
|  | @ -6,6 +6,7 @@ import ( | ||||||
| 	"net/http/cookiejar" | 	"net/http/cookiejar" | ||||||
| 	"regexp" | 	"regexp" | ||||||
| 	"strings" | 	"strings" | ||||||
|  | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/bndr/gojenkins" | 	"github.com/bndr/gojenkins" | ||||||
| 	"github.com/pkg/errors" | 	"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") | 		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 { | 	if len(userName) > 0 && len(passwordOrToken) > 0 { | ||||||
| 		basicAuth = &gojenkins.BasicAuth{Username: userName, Password: passwordOrToken} | 		basicAuth = &gojenkins.BasicAuth{Username: userName, Password: passwordOrToken} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue