1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
* parse flag before using args

* update CI build script
This commit is contained in:
Shivkumar Dudhani 2019-12-30 10:48:04 -08:00 committed by GitHub
parent dd27bba9f7
commit 3fa411e982
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 4 deletions

View file

@ -19,7 +19,11 @@ before_install:
install: true
script:
- make build || travis_terminate 1;
# build initContainer
- make docker-build-initContainer || travis_terminate 1;
# build kyverno container
- make docker-build-kyverno || travis_terminate 1;
# tests
- make test-all || travis_terminate 1;
after_script:

View file

@ -31,9 +31,6 @@ func main() {
defer glog.Flush()
// os signal handler
stopCh := signal.SetupSignalHandler()
// arguments
flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
// create client config
clientConfig, err := createClientConfig(kubeconfig)
if err != nil {
@ -82,6 +79,15 @@ func main() {
}
}
func init() {
// arguments
flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
flag.Set("logtostderr", "true")
flag.Set("stderrthreshold", "WARNING")
flag.Set("v", "2")
flag.Parse()
}
func removeWebhookIfExists(client *client.Client, kind string, name string) error {
var err error
// Get resource