Last active
June 5, 2020 04:20
-
-
Save pritidesai/0c938e4034dbe9e441fee147f1d637cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: tekton.dev/v1beta1 | |
kind: Pipeline | |
metadata: | |
name: pipeline-with-missing-params | |
spec: | |
params: | |
- name: pl-param-x | |
type: string | |
- name: pl-param-y | |
type: string | |
tasks: | |
- name: add-params | |
taskRef: | |
name: add-params | |
params: | |
- name: a | |
value: "$(params.pl-param-x)" | |
- name: b | |
value: "$(params.pl-param-y)" | |
--- | |
apiVersion: tekton.dev/v1beta1 | |
kind: Task | |
metadata: | |
name: add-params | |
annotations: | |
description: | | |
A simple task that sums the two provided integers | |
spec: | |
params: | |
- name: a | |
type: string | |
description: The first integer | |
- name: b | |
type: string | |
description: The second integer | |
steps: | |
- name: sum | |
image: bash:latest | |
script: | | |
#!/usr/bin/env bash | |
echo -n $(( "$(inputs.params.a)" + "$(inputs.params.b)" )) | |
--- | |
apiVersion: tekton.dev/v1beta1 | |
kind: PipelineRun | |
metadata: | |
name: pipelinerun-with-missing-params | |
spec: | |
params: | |
- name: pl-param-x | |
value: "100" | |
pipelineRef: | |
name: pipeline-with-missing-params |
Author
pritidesai
commented
Jun 5, 2020
kubectl get pr
NAME SUCCEEDED REASON STARTTIME COMPLETIONTIME
pipelinerun-with-missing-params False Failed 4m56s 4m51s
kubectl get pods
NAME READY STATUS RESTARTS AGE
pipelinerun-with-missing-params-add-params-rnwqd-pod-vr7zk 0/1 Error 0 5m26s
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment