@@ -39,9 +39,11 @@ import (
39
39
)
40
40
41
41
var flManifest string
42
+ var flSkipInstall bool
42
43
43
44
func init () {
44
45
flag .StringVar (& flManifest , "manifest" , "" , "path to plugin manifest file" )
46
+ flag .BoolVar (& flSkipInstall , "skip-install" , false , "skips installing the plugin as part of the validation" )
45
47
}
46
48
47
49
func main () {
@@ -97,15 +99,17 @@ func validateManifestFile(path string) error {
97
99
}
98
100
klog .Infof ("no overlapping spec.platform[].selector" )
99
101
100
- // exercise "install" for all platforms
101
- for i , p := range p .Spec .Platforms {
102
- klog .Infof ("installing spec.platform[%d]" , i )
103
- if err := installPlatformSpec (path , p ); err != nil {
104
- return errors .Wrapf (err , "spec.platforms[%d] failed to install" , i )
102
+ if ! flSkipInstall {
103
+ // exercise "install" for all platforms
104
+ for i , p := range p .Spec .Platforms {
105
+ klog .Infof ("installing spec.platform[%d]" , i )
106
+ if err := installPlatformSpec (path , p ); err != nil {
107
+ return errors .Wrapf (err , "spec.platforms[%d] failed to install" , i )
108
+ }
109
+ klog .Infof ("installed spec.platforms[%d]" , i )
105
110
}
106
- klog . Infof ( "installed spec.platforms[%d] " , i )
111
+ log . Printf ( "all %d spec.platforms installed fine " , len ( p . Spec . Platforms ) )
107
112
}
108
- log .Printf ("all %d spec.platforms installed fine" , len (p .Spec .Platforms ))
109
113
return nil
110
114
}
111
115
0 commit comments