You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2019/09/23 16:32:28 UTC
[camel-k] 01/07: Initial test
This is an automated email from the ASF dual-hosted git repository.
nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 93a85ef45cc6f85a980ecde9ec57a68f56cbae8b
Author: nferraro <ni...@gmail.com>
AuthorDate: Wed Sep 18 17:39:08 2019 +0200
Initial test
---
build/Dockerfile | 1 +
examples/tekton/camel-k-pipeline-run.yaml | 52 +++++++++++++++++++++++++++++++
examples/tekton/hello.groovy | 19 +++++++++++
3 files changed, 72 insertions(+)
diff --git a/build/Dockerfile b/build/Dockerfile
index c2fd9d2..6ded515 100644
--- a/build/Dockerfile
+++ b/build/Dockerfile
@@ -25,3 +25,4 @@ USER 1000
ADD build/_output/bin/camel-k /usr/local/bin/camel-k
ADD build/_output/bin/builder /usr/local/bin/camel-k-builder
+ADD build/_output/bin/kamel /usr/local/bin/kamel
diff --git a/examples/tekton/camel-k-pipeline-run.yaml b/examples/tekton/camel-k-pipeline-run.yaml
new file mode 100644
index 0000000..f50df36
--- /dev/null
+++ b/examples/tekton/camel-k-pipeline-run.yaml
@@ -0,0 +1,52 @@
+---
+apiVersion: tekton.dev/v1alpha1
+kind: PipelineResource
+metadata:
+ name: camel-k-examples-git
+spec:
+ type: git
+ params:
+ - name: revision
+ value: tekton
+ - name: url
+ value: https://github.com/nicolaferraro/camel-k
+---
+apiVersion: tekton.dev/v1alpha1
+kind: Task
+metadata:
+ name: camel-k-install-operator
+spec:
+ steps:
+ - name: install
+ image: apache/camel-k:1.0.0-M1
+ command:
+ - kamel
+ args:
+ - "install"
+ - "--skip-cluster-setup"
+---
+apiVersion: tekton.dev/v1alpha1
+kind: Pipeline
+metadata:
+ name: camel-k-pipeline
+spec:
+ resources:
+ - name: source-repo
+ type: git
+ tasks:
+ - name: install-operator
+ taskRef:
+ name: camel-k-install-operator
+---
+apiVersion: tekton.dev/v1alpha1
+kind: PipelineRun
+metadata:
+ name: camel-k-pipeline-run-1
+spec:
+ pipelineRef:
+ name: camel-k-pipeline
+ serviceAccount: 'default'
+ resources:
+ - name: source-repo
+ resourceRef:
+ name: camel-k-examples-git
diff --git a/examples/tekton/hello.groovy b/examples/tekton/hello.groovy
new file mode 100644
index 0000000..39d23f6
--- /dev/null
+++ b/examples/tekton/hello.groovy
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+from('timer:groovy?period=1s')
+ .log('Hello Camel K from Tekton pipelines')