Run an Integration from GitHub
It is possible to run integrations from a GitHub repository or Gist with dedicated URL syntax:
Integration code stored in a Github repository
Syntax
kamel run github:$user/$repo/$path?branch=$branch
As example, running the following command
kamel run github:apache/camel-k/examples/languages/Sample.java
is equivalent to:
kamel run https://raw.githubusercontent.com/apache/camel-k/main/examples/languages/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.
Integration code stored in a 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. |