Skip to content

Instantly share code, notes, and snippets.

@pritidesai
Created May 8, 2020 23:31
Show Gist options
  • Save pritidesai/1e63fe275f81ad7ca5ddec2ab2e0fdc9 to your computer and use it in GitHub Desktop.
Save pritidesai/1e63fe275f81ad7ca5ddec2ab2e0fdc9 to your computer and use it in GitHub Desktop.
{
"apiVersion": "tekton.dev/v1beta1",
"kind": "PipelineRun",
"metadata": {
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"tekton.dev/v1alpha1\",\"kind\":\"Pipeline\",\"metadata\":{\"annotations\":{},\"name\":\"conditional-pipeline\",\"namespace\":\"default\"},\"spec\":{\"tasks\":[{\"conditions\":[{\"conditionRef\":\"file-exists\"}],\"name\":\"then-check\",\"taskRef\":{\"name\":\"echo-hello\"}}]}}\n"
},
"creationTimestamp": "2020-05-08T23:27:10Z",
"generation": 1,
"labels": {
"tekton.dev/pipeline": "conditional-pipeline"
},
"name": "condtional-pr",
"namespace": "default",
"resourceVersion": "3296936",
"selfLink": "/apis/tekton.dev/v1beta1/namespaces/default/pipelineruns/condtional-pr",
"uid": "e98656f1-2559-4ff3-813d-f4c6ce035a49"
},
"spec": {
"pipelineRef": {
"name": "conditional-pipeline"
},
"serviceAccountName": "default",
"timeout": "1h0m0s"
},
"status": {
"completionTime": "2020-05-08T23:27:25Z",
"conditions": [
{
"lastTransitionTime": "2020-05-08T23:27:25Z",
"message": "Tasks Completed: 1, Skipped: 0",
"reason": "Succeeded",
"status": "True",
"type": "Succeeded"
}
],
"pipelineSpec": {
"tasks": [
{
"conditions": [
{
"conditionRef": "file-exists"
}
],
"name": "then-check",
"taskRef": {
"kind": "Task",
"name": "echo-hello"
}
}
]
},
"startTime": "2020-05-08T23:27:10Z",
"taskRuns": {
"condtional-pr-then-check-xk2cw": {
"conditionChecks": {
"condtional-pr-then-check-xk2cw-file-exists-0-qms44": {
"conditionName": "file-exists-0",
"status": {
"check": {
"terminated": {
"containerID": "docker://8a946344b69f73ac418fd7c5694d738f0c39255acf0e428c866e097590af8859",
"exitCode": 0,
"finishedAt": "2020-05-08T23:27:19Z",
"reason": "Completed",
"startedAt": "2020-05-08T23:27:19Z"
}
},
"completionTime": "2020-05-08T23:27:19Z",
"conditions": [
{
"lastTransitionTime": "2020-05-08T23:27:19Z",
"message": "All Steps have completed executing",
"reason": "Succeeded",
"status": "True",
"type": "Succeeded"
}
],
"podName": "condtional-pr-then-check-xk2cw-file-exists-0-qms44-pod-56vjh",
"startTime": "2020-05-08T23:27:10Z"
}
}
},
"pipelineTaskName": "then-check",
"status": {
"completionTime": "2020-05-08T23:27:25Z",
"conditions": [
{
"lastTransitionTime": "2020-05-08T23:27:25Z",
"message": "All Steps have completed executing",
"reason": "Succeeded",
"status": "True",
"type": "Succeeded"
}
],
"podName": "condtional-pr-then-check-xk2cw-pod-9rgqr",
"startTime": "2020-05-08T23:27:19Z",
"steps": [
{
"container": "step-echo",
"imageID": "docker-pullable://ubuntu@sha256:747d2dbbaaee995098c9792d99bd333c6783ce56150d1b11e333bbceed5c54d7",
"name": "echo",
"terminated": {
"containerID": "docker://37f58b4871b5b13f9d2815c7171640bb8f0bd791e25728da7bf0b1d5f1bc8a01",
"exitCode": 0,
"finishedAt": "2020-05-08T23:27:25Z",
"reason": "Completed",
"startedAt": "2020-05-08T23:27:25Z"
}
}
],
"taskSpec": {
"steps": [
{
"image": "ubuntu",
"name": "echo",
"resources": {},
"script": "echo hello"
}
]
}
}
},
"condtional-pr-then-check-xk2cw-file-exists-0-qms44": {
"pipelineTaskName": "condtional-pr-then-check-xk2cw-file-exists-0-qms44",
"status": {
"completionTime": "2020-05-08T23:27:19Z",
"conditions": [
{
"lastTransitionTime": "2020-05-08T23:27:19Z",
"message": "All Steps have completed executing",
"reason": "Succeeded",
"status": "True",
"type": "Succeeded"
}
],
"podName": "condtional-pr-then-check-xk2cw-file-exists-0-qms44-pod-56vjh",
"startTime": "2020-05-08T23:27:10Z",
"steps": [
{
"container": "step-condition-check-file-exists",
"imageID": "docker-pullable://alpine@sha256:9a839e63dad54c3a6d1834e29692c8492d93f90c59c978c1ed79109ea4fb9a54",
"name": "condition-check-file-exists",
"terminated": {
"containerID": "docker://8a946344b69f73ac418fd7c5694d738f0c39255acf0e428c866e097590af8859",
"exitCode": 0,
"finishedAt": "2020-05-08T23:27:19Z",
"reason": "Completed",
"startedAt": "2020-05-08T23:27:19Z"
}
}
],
"taskSpec": {
"steps": [
{
"image": "alpine",
"name": "condition-check-file-exists",
"resources": {},
"script": "test 1 -gt 0"
}
]
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment