Skip to content

Commit

Permalink
(apache#5489) Groovy > Yaml - docs index
Browse files Browse the repository at this point in the history
  • Loading branch information
tdiesler committed May 15, 2024
1 parent d05d4e4 commit cb847ba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
3 changes: 2 additions & 1 deletion docs/local-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# limitations under the License.
#

CW=./../../camel-website
SCRIPT_DIR=$(dirname $0)
CW=${SCRIPT_DIR}/../../camel-website
LOCAL=./../camel-k

cd $CW || (echo 'camel-website not in expected location $CW' && exit)
Expand Down
27 changes: 17 additions & 10 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,26 @@ Users of Camel K can instantly run integration code written in Camel DSL on thei
[[how-it-works]]
== How It Works

Just write a _helloworld.groovy_ integration file with the following content:

```groovy
from('timer:tick?period=3000')
.setBody().constant('Hello world from Camel K')
.to('log:info')
```
Just write a _helloworld.yaml_ integration file with the following content:

[source,yaml]
----
- from:
uri: "timer:tick"
parameters:
period: "3000"
steps:
- setBody:
simple: "Hello world from Camel K"
- to: "log:info"
----

You can then execute the following command:

```
kamel run helloworld.groovy
```
[source]
----
kamel run helloworld.yaml
----

The integration code immediately runs in the cloud. **Nothing else** is needed.

Expand Down

0 comments on commit cb847ba

Please sign in to comment.