Created
March 24, 2020 06:57
-
-
Save ahpook/996e503d4f0d7a6fe9f44461fd6e5047 to your computer and use it in GitHub Desktop.
Conditional pipelinerun - Pipeline definition
This file contains 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: conditional-pipeline | |
spec: | |
resources: | |
- name: source-repo | |
type: git | |
params: | |
- name: "path" | |
default: "README.md" | |
tasks: | |
- name: first-create-file | |
taskRef: | |
name: create-readme-file | |
resources: | |
outputs: | |
- name: workspace | |
resource: source-repo | |
- name: then-check | |
conditions: | |
- conditionRef: "file-exists" | |
params: | |
- name: "path" | |
value: "$(params.path)" | |
resources: | |
- name: workspace | |
resource: source-repo | |
from: [first-create-file] | |
taskRef: | |
name: echo-hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment