Last active
August 27, 2020 05:58
-
-
Save pritidesai/cbc7caadbd80f02745383acf524e3186 to your computer and use it in GitHub Desktop.
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
kubectl get pr -o json | |
{ | |
"apiVersion": "v1", | |
"items": [ | |
{ | |
"apiVersion": "tekton.dev/v1beta1", | |
"kind": "PipelineRun", | |
"metadata": { | |
"annotations": { | |
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"tekton.dev/v1beta1\",\"kind\":\"PipelineRun\",\"metadata\":{\"annotations\":{},\"name\":\"pipelinerun-to-skip-task\",\"namespace\":\"default\"},\"spec\":{\"params\":[{\"name\":\"param\",\"value\":\"spec\"}],\"pipelineSpec\":{\"params\":[{\"default\":\"pipelineSpec\",\"name\":\"param\"}],\"tasks\":[{\"name\":\"skip-this-task\",\"taskSpec\":{\"steps\":[{\"image\":\"ubuntu\",\"name\":\"echo\",\"script\":\"#!/usr/bin/env bash\\necho \\\"Good Morning!\\\"\\n\"}]},\"when\":[{\"input\":\"$(params.param)\",\"operator\":\"in\",\"values\":[\"foo\"]}]},{\"name\":\"execute-this-task\",\"runAfter\":[\"skip-this-task\"],\"taskSpec\":{\"steps\":[{\"image\":\"ubuntu\",\"name\":\"echo\",\"script\":\"#!/usr/bin/env bash\\necho \\\"Good Morning!\\\"\\n\"}]},\"when\":[{\"input\":\"bar\",\"operator\":\"in\",\"values\":[\"bar\"]}]}]}}}\n" | |
}, | |
"creationTimestamp": "2020-08-27T05:47:58Z", | |
"generation": 1, | |
"labels": { | |
"tekton.dev/pipeline": "pipelinerun-to-skip-task" | |
}, | |
"name": "pipelinerun-to-skip-task", | |
"namespace": "default", | |
"resourceVersion": "2063663", | |
"selfLink": "/apis/tekton.dev/v1beta1/namespaces/default/pipelineruns/pipelinerun-to-skip-task", | |
"uid": "dde3a2f8-2cd9-4463-9122-962a73d9aa49" | |
}, | |
"spec": { | |
"params": [ | |
{ | |
"name": "param", | |
"value": "spec" | |
} | |
], | |
"pipelineSpec": { | |
"params": [ | |
{ | |
"default": "pipelineSpec", | |
"name": "param", | |
"type": "string" | |
} | |
], | |
"tasks": [ | |
{ | |
"name": "skip-this-task", | |
"taskSpec": { | |
"metadata": {}, | |
"steps": [ | |
{ | |
"image": "ubuntu", | |
"name": "echo", | |
"resources": {}, | |
"script": "#!/usr/bin/env bash\necho \"Good Morning!\"\n" | |
} | |
] | |
}, | |
"when": [ | |
{ | |
"input": "$(params.param)", | |
"operator": "in", | |
"values": [ | |
"foo" | |
] | |
} | |
] | |
}, | |
{ | |
"name": "execute-this-task", | |
"runAfter": [ | |
"skip-this-task" | |
], | |
"taskSpec": { | |
"metadata": {}, | |
"steps": [ | |
{ | |
"image": "ubuntu", | |
"name": "echo", | |
"resources": {}, | |
"script": "#!/usr/bin/env bash\necho \"Good Morning!\"\n" | |
} | |
] | |
}, | |
"when": [ | |
{ | |
"input": "bar", | |
"operator": "in", | |
"values": [ | |
"bar" | |
] | |
} | |
] | |
} | |
] | |
}, | |
"timeout": "1h0m0s" | |
}, | |
"status": { | |
"completionTime": "2020-08-27T05:47:58Z", | |
"conditions": [ | |
{ | |
"lastTransitionTime": "2020-08-27T05:47:58Z", | |
"message": "Tasks Completed: 0 (Failed: 0, Cancelled 0), Skipped: 2", | |
"reason": "Completed", | |
"status": "True", | |
"type": "Succeeded" | |
} | |
], | |
"pipelineSpec": { | |
"params": [ | |
{ | |
"default": "pipelineSpec", | |
"name": "param", | |
"type": "string" | |
} | |
], | |
"tasks": [ | |
{ | |
"name": "skip-this-task", | |
"taskSpec": { | |
"metadata": {}, | |
"steps": [ | |
{ | |
"image": "ubuntu", | |
"name": "echo", | |
"resources": {}, | |
"script": "#!/usr/bin/env bash\necho \"Good Morning!\"\n" | |
} | |
] | |
}, | |
"when": [ | |
{ | |
"input": "$(params.param)", | |
"operator": "in", | |
"values": [ | |
"foo" | |
] | |
} | |
] | |
}, | |
{ | |
"name": "execute-this-task", | |
"runAfter": [ | |
"skip-this-task" | |
], | |
"taskSpec": { | |
"metadata": {}, | |
"steps": [ | |
{ | |
"image": "ubuntu", | |
"name": "echo", | |
"resources": {}, | |
"script": "#!/usr/bin/env bash\necho \"Good Morning!\"\n" | |
} | |
] | |
}, | |
"when": [ | |
{ | |
"input": "bar", | |
"operator": "in", | |
"values": [ | |
"bar" | |
] | |
} | |
] | |
} | |
] | |
}, | |
"startTime": "2020-08-27T05:47:58Z", | |
"taskRuns": { | |
"pipelinerun-to-skip-task-execute-this-task-wvh5s": { | |
"pipelineTaskName": "execute-this-task", | |
"status": { | |
"podName": "" | |
}, | |
"whenExpressionsStatus": { | |
"evaluationResults": [ | |
{ | |
"expression": { | |
"input": "bar", | |
"operator": "in", | |
"values": [ | |
"bar" | |
] | |
}, | |
"result": true | |
} | |
], | |
"execute": true | |
} | |
}, | |
"pipelinerun-to-skip-task-skip-this-task-bmrxs": { | |
"pipelineTaskName": "skip-this-task", | |
"status": { | |
"conditions": [ | |
{ | |
"lastTransitionTime": "2020-08-27T05:47:58Z", | |
"message": "When Expressions for Task pipelinerun-to-skip-task-skip-this-task-bmrxs in PipelineRun pipelinerun-to-skip-task evaluated to False", | |
"reason": "WhenExpressionsEvaluatedToFalse", | |
"status": "False", | |
"type": "Succeeded" | |
} | |
], | |
"podName": "" | |
}, | |
"whenExpressionsStatus": { | |
"evaluationResults": [ | |
{ | |
"expression": { | |
"input": "spec", | |
"operator": "in", | |
"values": [ | |
"foo" | |
] | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
} | |
], | |
"kind": "List", | |
"metadata": { | |
"resourceVersion": "", | |
"selfLink": "" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample PipelineRun: