You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by jp...@apache.org on 2022/06/03 08:25:03 UTC
[camel-k] 05/06: feat(cli): Add option to skip checksum files when uploading artifacts
This is an automated email from the ASF dual-hosted git repository.
jpoth pushed a commit to branch release-1.9.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 00fe5d756d8d8fbde7843676d7c8b2eb42eee59e
Author: John Poth <po...@gmail.com>
AuthorDate: Mon May 23 17:26:13 2022 +0200
feat(cli): Add option to skip checksum files when uploading artifacts
(cherry picked from commit 5ef7236fa51bb93d30d07e597ed5854ef41e8d92)
---
pkg/cmd/run.go | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index 955b4aaeb..249460dce 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -94,7 +94,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>®istry=<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>®istry=<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])")
@@ -813,6 +813,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")
}
@@ -993,6 +997,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)
}