Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kamel CLI run from URL #1136

Closed
hguerrero opened this issue Dec 11, 2019 · 3 comments
Closed

Kamel CLI run from URL #1136

hguerrero opened this issue Dec 11, 2019 · 3 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@hguerrero
Copy link
Contributor

You can provide a file as an argument to run an integration, but we also need to be able to run an integration from a github/URL repository. Like:

kamel run -d camel-http https://raw.githubusercontent.com/hguerrero/camel-netty-proxy/master/src/main/java/com/github/zregvart/cnp/ProxyRoute.java

Kamel CLI should pass the URL directly to the operator or can download locally the file and then send it to the operator.

@lburgazzoli
Copy link
Contributor

this should be supported, does ti fails ?

@hguerrero
Copy link
Contributor Author

This is the error when trying:

integration "proxy" created
Error: stat /Users/hguerrer/https:/raw.githubusercontent.com/hguerrero/camel-netty-proxy/master/src/main/java/com/github/zregvart/cnp/ProxyRoute.java: no such file or directory
Usage:
  kamel run [file to run] [flags]

Flags:
      --compression             Enable store source as a compressed binary blob
      --configmap strings       Add a ConfigMap
  -d, --dependency strings      The integration dependency
      --dev                     Enable Dev mode (equivalent to "-w --logs --sync")
  -e, --env strings             Set an environment variable in the integration container. E.g "-e MY_VAR=my-value"
  -h, --help                    help for run
  -k, --kit string              The kit used to run the integration
      --logging-level strings   Configure the logging level. E.g. "--logging-level org.apache.camel=DEBUG"
      --logs                    Print integration logs
      --name string             The integration name
      --open-api strings        Add an OpenAPI v2 spec
  -o, --output string           Output format. One of: json|yaml
      --profile string          Trait profile used for deployment
  -p, --property stringArray    Add a camel property
      --repository strings      Add a maven repository
      --resource strings        Add a resource
      --secret strings          Add a Secret
      --sync                    Synchronize the local source file with the cluster, republishing at each change
  -t, --trait strings           Configure a trait. E.g. "-t service.enabled=false"
  -v, --volume strings          Mount a volume into the integration container. E.g "-v pvcname:/container/path"
  -w, --wait                    Waits for the integration to be running

Global Flags:
      --config string      Path to the config file to use for CLI requests
  -n, --namespace string   Namespace to use for all operations

Error: stat /Users/hguerrer/https:/raw.githubusercontent.com/hguerrero/camel-netty-proxy/master/src/main/java/com/github/zregvart/cnp/ProxyRoute.java: no such file or directory```

@nicolaferraro nicolaferraro added this to the 1.0.0-CR1 milestone Dec 13, 2019
@nicolaferraro nicolaferraro added the kind/bug Something isn't working label Dec 13, 2019
@nicolaferraro nicolaferraro self-assigned this Dec 14, 2019
@nicolaferraro
Copy link
Member

It works normally.. Except for the "package" issue #1132.

That error happens only if the user enables dev mode.. watching the remote http file does not make a lot of sense, maybe we can just warn..

@oscerd oscerd closed this as completed in e6ea9e5 Dec 15, 2019
oscerd added a commit that referenced this issue Dec 15, 2019
fix #1136: do not watch remote files in dev mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants