Last active
June 5, 2020 04:48
-
-
Save pritidesai/889749f0735def3504b0180b0931c86f 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-default-params | |
spec: | |
params: | |
- name: pl-param-x | |
type: string | |
- name: pl-param-y | |
type: string | |
default: "2" | |
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-default-params | |
spec: | |
params: | |
- name: pl-param-x | |
value: "100" | |
pipelineRef: | |
name: pipeline-with-missing-default-params |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment