Skip to content

Commit

Permalink
doc: tekton cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed Jun 21, 2023
1 parent b3b833f commit b0a0af7
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 246 deletions.
5 changes: 3 additions & 2 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@
** xref:running/local.adoc[Run Locally]
** xref:running/promoting.adoc[Promote an Integration]
** xref:running/knative-sink.adoc[Knative Sinks]
** xref:tutorials/tutorials.adoc[Examples]
* xref:configuration/configuration.adoc[Configuration]
** xref:configuration/build-time-properties.adoc[Build time properties]
** xref:configuration/components.adoc[Components]
** xref:configuration/dependencies.adoc[Dependencies]
** xref:configuration/runtime-properties.adoc[Properties]
** xref:configuration/runtime-config.adoc[Runtime configuration]
** xref:configuration/runtime-resources.adoc[Runtime resources]
* xref:pipeline/pipeline.adoc[Pipeline]
* Pipelines
* xref:pipeline/pipeline.adoc[Basic]
* xref:pipeline/tekton.adoc[Tekton]
* Observability
** xref:observability/logging.adoc[Logging]
*** xref:observability/logging/operator.adoc[Operator]
Expand Down
60 changes: 60 additions & 0 deletions docs/modules/ROOT/pages/pipeline/tekton.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[[full-fledged-pipeline]]
= 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 xref:pipeline/pipeline.adoc[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 https://tekton.dev/[Tekton CICD].

[[tekton-pipeline]]
== Integrate with Tekton

In Camel K version 2 we are supporting a Task which we're willing to include in https://hub.tekton.dev/[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.

=== Install the Task

```shell
kubectl apply -f https://raw.githubusercontent.com/apache/camel-k/main/tekton/kamel-run/0.1/kamel-run.yaml
```
=== Parameters

- **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").

=== Workspaces

* **source**: A https://github.com/tektoncd/pipeline/blob/main/docs/workspaces.md[Workspace] containing the Integration source to run.

=== Results

- **integration-name**: the Integration name which was created/updated.
- **integration-phase**: the status of the Integration, tipycally used with **wait: true** input parameter.

=== Platforms

The Task can be run on `linux/amd64` platform.

=== Usage

The Task can be used in several ways to accomodate the different build and deployment strategy you may have.

=== Create the Service Account

As we will do delegate the task, the creation of an Integration, we need to provide a `ServiceAccount` with the privileges required by the tasks:

```shell
kubectl apply -f https://raw.githubusercontent.com/apache/camel-k/main/tekton/kamel-run/0.1/support/camel-k-tekton.yaml
```

[[tekton-pipeline-examples]]
== Examples

Here some examples that may resylt useful for your use case.

=== Delegate build to operator

Use the https://raw.githubusercontent.com/apache/camel-k/main/tekton/kamel-run/0.1/samples/run-operator-build.yaml[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.

=== Full pipeline with custom build

Use the https://raw.githubusercontent.com/apache/camel-k/main/tekton/kamel-run/0.1/samples/run-external-build.yaml[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.
236 changes: 0 additions & 236 deletions docs/modules/ROOT/pages/tutorials/tekton/tekton.adoc

This file was deleted.

8 changes: 0 additions & 8 deletions docs/modules/ROOT/pages/tutorials/tutorials.adoc

This file was deleted.

0 comments on commit b0a0af7

Please sign in to comment.