Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pritidesai/602e49813bb9220c8c4d07bf15c92fbe to your computer and use it in GitHub Desktop.
Save pritidesai/602e49813bb9220c8c4d07bf15c92fbe to your computer and use it in GitHub Desktop.
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: when-expressions-
spec:
pipelineSpec:
tasks:
- name: echo-message-1
taskSpec:
results:
- name: message
steps:
- name: echo
image: ubuntu
script: |
#!/usr/bin/env bash
echo -n "HI" | tee $(results.message.path)
- name: echo-message-2
when:
- input: $(tasks.echo-message-1.results.message)
operator: notin
values: ["HI"]
taskSpec:
steps:
- name: echo
image: ubuntu
script: |
#!/usr/bin/env bash
echo "Hi!"
- name: echo-message-3
runAfter: [ "echo-message-2" ]
taskSpec:
steps:
- name: echo
image: ubuntu
script: |
#!/usr/bin/env bash
echo "Hi!"
finally:
- name: echo-message-4
taskSpec:
steps:
- name: echo
image: ubuntu
script: |
#!/usr/bin/env bash
echo "Hi!"
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment