Run from GitHub
It is possible to run integrations from a GitHub repository or Gist with dedicated URL syntax:
Repository
Syntax
kamel run github:$user/$repo/$path?branch=$branch
As example, running the following command
kamel run github:apache/camel-k/examples/Sample.java
is equivalent to:
kamel run https://raw.githubusercontent.com/apache/camel-k/master/examples/Sample.java
but does not require to type the full GitHub RAW URL.
Declaring the branch query param is not required and defaults to master
if not explicit set.
Gist
Syntax
kamel run https://gist.github.com/${user-id}/${gist-id}
kamel run gist:${gist-id}
camel-k will add any file that is part of the Gist as a source.
As example, assuming there are two files listed as part of a Gist, beans.yaml and routes.yaml, then the following command
kamel run gist:${gist-id}
is equivalent to:
kamel run \
https://gist.githubusercontent.com/${user-id}/${gist-id}/raw/${...}/beans.yaml \
https://gist.githubusercontent.com/${user-id}/${gist-id}/raw/${...}/routes.yaml
GitHub applies rate limiting to its APIs and as Authenticated requests get a higher rate limit, the camel-k cli honour the env var GITHUB_TOKEN and if it is found, then it is used for GitHub authentication. |