Full fledged Pipeline
If you’re running a production grade enterprise system, you likely want to use a full fledged CICD technology. The basic features provided by our homemade Pipeline may be definetely limited in such situation. For those production grade requirements we suggest to integrate one of the many CICD technologies around. One that we want to suggest and for which we provide an opinionated approach is Tekton CICD.
In Camel K version 2 we are supporting a Task which we’re willing to include in Tekton Hub. Here it follows the instructions and some example to show you how to adopt this technology togheter with Camel K. The prerequisite is to have Camel K and Tekton operators up and running. This brief guide requires certain previous familiarity with Tekton technology as well.
kubectl apply -f https://raw.githubusercontent.com/apache/camel-k/main/cicd/tekton/kamel-run/0.1/kamel-run.yaml
camel-k-image: The name of the image containing the Kamel CLI (default: docker.io/apache/camel-k:1.12.0).
filename: the file containing the Integration source.
namespace: the namespace where to run the Integration (default: the task execution namespace).
container-image: the container image to use for this Integration. Useful when you want to build your own container for the Integration (default: empty, will trigger an Integration build).
wait: wait for the Integration to run before finishing the task. Useful when you want to get the integration-phase result (default: "false").
source: A Workspace containing the Integration source to run.
integration-name: the Integration name which was created/updated.
integration-phase: the status of the Integration, tipycally used with wait: true input parameter.
The Task can be used in several ways to accomodate the different build and deployment strategy you may have.
Here some examples that may resylt useful for your use case.
Use the Tekton Camel K operator builder sample in order to fetch a Git repository and run a Camel K Integration delegating the build to the Camel K operator.
Use the Tekton Camel K external builder sample as a reference for a full pipeline where you define your own process of building the Camel application and using the
kamel-run Task as last step in order to deploy the Integration and let Camel K operator managing it.