diff --git a/task/kamel-run/0.1/tests/pre-apply-task-hook.sh b/task/kamel-run/0.1/tests/pre-apply-task-hook.sh index 2a28f5f5..ecadfb19 100755 --- a/task/kamel-run/0.1/tests/pre-apply-task-hook.sh +++ b/task/kamel-run/0.1/tests/pre-apply-task-hook.sh @@ -7,4 +7,6 @@ tar -xvf camel-k-client-2.0.0-linux-amd64.tar.gz ./kamel install --registry localhost:5000 --registry-insecure --wait # Add git-clone -add_task git-clone latest \ No newline at end of file +add_task git-clone latest +add_task buildah latest +add_task maven latest \ No newline at end of file diff --git a/task/kamel-run/0.1/tests/run.yaml b/task/kamel-run/0.1/tests/run.yaml index 7e807e73..4086f348 100644 --- a/task/kamel-run/0.1/tests/run.yaml +++ b/task/kamel-run/0.1/tests/run.yaml @@ -2,72 +2,148 @@ apiVersion: tekton.dev/v1beta1 kind: Pipeline metadata: - name: kamel-run-test + name: kamel-run-basic-test spec: workspaces: - - name: shared-workspace + - name: shared-workspace tasks: - - name: fetch-repository - taskRef: - name: git-clone - workspaces: - - name: output - workspace: shared-workspace - params: - - name: url - value: https://github.com/apache/camel-k-examples/ - - name: kamel-run - taskRef: - name: kamel-run - runAfter: - - fetch-repository - workspaces: - - name: source - workspace: shared-workspace - params: - - name: filename - value: generic-examples/languages/routes.yaml - - name: wait - value: "false" - - name: verify-it-phase - runAfter: - - kamel-run - params: - - name: it-name - value: "$(tasks.kamel-run.results.integration-name)" - taskSpec: + - name: fetch-repository + taskRef: + name: git-clone + workspaces: + - name: output + workspace: shared-workspace params: - - name: it-name - steps: - - name: bash - image: ubuntu - script: | - #!/usr/bin/env bash - set -e + - name: url + value: https://github.com/apache/camel-k-examples/ + - name: kamel-run + taskRef: + name: kamel-run + runAfter: + - fetch-repository + workspaces: + - name: source + workspace: shared-workspace + params: + - name: filename + value: generic-examples/languages/routes.yaml + - name: wait + value: "false" + - name: verify-it-phase + runAfter: + - kamel-run + params: + - name: it-name + value: "$(tasks.kamel-run.results.integration-name)" + taskSpec: + params: + - name: it-name + steps: + - name: bash + image: ubuntu + script: | + #!/usr/bin/env bash + set -e - if [ "$(params.it-name)" != "routes" ]; then - echo "Expected integration name routes (was $(params.it-name))" - exit 1 - fi - exit 0 + if [ "$(params.it-name)" != "routes" ]; then + echo "Expected integration name routes (was $(params.it-name))" + exit 1 + fi + exit 0 --- apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: - name: kamel-run-test-run + name: kamel-run-basic-test-run spec: pipelineRef: - name: kamel-run-test + name: kamel-run-basic-test taskRunSpecs: - pipelineTaskName: kamel-run taskServiceAccountName: camel-k-tekton workspaces: - - name: shared-workspace - volumeClaimTemplate: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi + - name: shared-workspace + volumeClaimTemplate: + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: kamel-run-image-test +spec: + workspaces: + - name: shared-workspace + tasks: + - name: fetch-repository + taskRef: + name: git-clone + workspaces: + - name: output + workspace: shared-workspace + params: + - name: url + value: https://github.com/apache/camel-k-examples/ + - name: kamel-run + taskRef: + name: kamel-run + runAfter: + - fetch-repository + workspaces: + - name: source + workspace: shared-workspace + params: + - name: filename + value: generic-examples/languages/routes.yaml + - name: wait + value: "false" + - name: container-image + value: docker.io/apache/camel-k:2.0.0 + - name: verify-it-phase + runAfter: + - kamel-run + params: + - name: it-name + value: "$(tasks.kamel-run.results.integration-name)" + taskSpec: + params: + - name: it-name + steps: + - name: bash + image: ubuntu + script: | + #!/usr/bin/env bash + set -e + + if [ "$(params.it-name)" != "routes" ]; then + echo "Expected integration name routes (was $(params.it-name))" + exit 1 + fi + exit 0 + +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + name: kamel-run-image-test-run +spec: + pipelineRef: + name: kamel-run-image-test + taskRunSpecs: + - pipelineTaskName: kamel-run + taskServiceAccountName: camel-k-tekton + workspaces: + - name: shared-workspace + volumeClaimTemplate: + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi \ No newline at end of file