feat(cli): Add option to skip checksum files when uploading artifacts
@@ -96,7 +96,7 @@ func newCmdRun(rootCmdOptions *RootCmdOptions) (*cobra.Command, *runCmdOptions)
cmd.Flags().String("name", "", "The integration name")
cmd.Flags().StringArrayP("connect", "c", nil, "A Service that the integration should bind to, specified as [[apigroup/]version:]kind:[namespace/]name")
- cmd.Flags().StringArrayP("dependency", "d", nil, "A dependency that should be included, e.g., \"-d camel-mail\" for a Camel component, \"-d mvn:org.my:app:1.0\" for a Maven dependency or \"file://localPath[?targetPath=<path>&registry=<registry URL>]\" for local files (experimental)")
+ cmd.Flags().StringArrayP("dependency", "d", nil, "A dependency that should be included, e.g., \"-d camel-mail\" for a Camel component, \"-d mvn:org.my:app:1.0\" for a Maven dependency or \"file://localPath[?targetPath=<path>&registry=<registry URL>&skipChecksums=<true>]\" for local files (experimental)")
cmd.Flags().BoolP("wait", "w", false, "Wait for the integration to be running")
cmd.Flags().StringP("kit", "k", "", "The kit used to run the integration")
cmd.Flags().StringArrayP("property", "p", nil, "Add a runtime property or properties file (syntax: [my-key=my-value|file:/path/to/my-conf.properties])")
@@ -825,6 +825,10 @@ func (o *runCmdOptions) getRegistry(platform *v1.IntegrationPlatform) string {
return platform.Status.Build.Registry.Address
}
+func (o *runCmdOptions) skipChecksums() bool {
+ return o.RegistryOptions.Get("skipChecksums") == "true"
+}
+
func (o *runCmdOptions) getTargetPath() string {
return o.RegistryOptions.Get("targetPath")
}
@@ -1005,6 +1009,10 @@ func (o *runCmdOptions) uploadAsMavenArtifact(dependency maven.Dependency, path
return err
}
o.PrintfVerboseOutf(cmd, "Uploaded: %s to %s \n", path, options.Target)
+ if o.skipChecksums() {
+ o.PrintfVerboseOutf(cmd, "Skipping generating and uploading checksum files for %s \n", path)
+ return nil
+ }
return o.uploadChecksumFiles(path, options, platform, artifactHTTPPath, dependency)
}
