Skip to content

Instantly share code, notes, and snippets.

@pritidesai
Created September 11, 2020 07:07
Show Gist options
  • Save pritidesai/dd783e34781224552feeaf8d8c84d25f to your computer and use it in GitHub Desktop.
Save pritidesai/dd783e34781224552feeaf8d8c84d25f to your computer and use it in GitHub Desktop.
kubectl get pr when-expression-9 -o json
{
"apiVersion": "tekton.dev/v1beta1",
"kind": "PipelineRun",
"metadata": {
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"tekton.dev/v1beta1\",\"kind\":\"PipelineRun\",\"metadata\":{\"annotations\":{},\"name\":\"when-expression-9\",\"namespace\":\"default\"},\"spec\":{\"pipelineSpec\":{\"finally\":[{\"name\":\"echo-message-3\",\"taskSpec\":{\"steps\":[{\"image\":\"ubuntu\",\"name\":\"echo\",\"script\":\"#!/usr/bin/env bash\\necho \\\"Hi!\\\"\\n\"}]}}],\"tasks\":[{\"name\":\"echo-message-1\",\"taskSpec\":{\"results\":[{\"description\":\"The sum of the two provided integers\",\"name\":\"message\"}],\"steps\":[{\"image\":\"ubuntu\",\"name\":\"echo\",\"script\":\"#!/usr/bin/env bash\\necho -n \\\"HI\\\" | tee $(results.message.path)\\n\"}]}},{\"name\":\"echo-message-2\",\"taskSpec\":{\"steps\":[{\"image\":\"ubuntu\",\"name\":\"echo\",\"script\":\"#!/usr/bin/env bash\\necho \\\"Hi!\\\"\\n\"}]},\"when\":[{\"input\":\"$(tasks.echo-message-1.results.message)\",\"operator\":\"notin\",\"values\":[\"HI\"]}]}]}}}\n"
},
"creationTimestamp": "2020-09-11T06:46:58Z",
"generation": 1,
"labels": {
"tekton.dev/pipeline": "when-expression-9"
},
"name": "when-expression-9",
"namespace": "default",
"resourceVersion": "77960",
"selfLink": "/apis/tekton.dev/v1beta1/namespaces/default/pipelineruns/when-expression-9",
"uid": "5aea1dbe-8a0d-4554-9cfc-9f0b2df631b6"
},
"spec": {
"pipelineSpec": {
"finally": [
{
"name": "echo-message-3",
"taskSpec": {
"metadata": {},
"steps": [
{
"image": "ubuntu",
"name": "echo",
"resources": {},
"script": "#!/usr/bin/env bash\necho \"Hi!\"\n"
}
]
}
}
],
"tasks": [
{
"name": "echo-message-1",
"taskSpec": {
"metadata": {},
"results": [
{
"description": "",
"name": "message"
}
],
"steps": [
{
"image": "ubuntu",
"name": "echo",
"resources": {},
"script": "#!/usr/bin/env bash\necho -n \"HI\" | tee $(results.message.path)\n"
}
]
}
},
{
"name": "echo-message-2",
"taskSpec": {
"metadata": {},
"steps": [
{
"image": "ubuntu",
"name": "echo",
"resources": {},
"script": "#!/usr/bin/env bash\necho \"Hi!\"\n"
}
]
},
"when": [
{
"Input": "$(tasks.echo-message-1.results.message)",
"Operator": "notin",
"Values": [
"HI"
]
}
]
}
]
},
"timeout": "1h0m0s"
},
"status": {
"conditions": [
{
"lastTransitionTime": "2020-09-11T06:47:06Z",
"message": "Tasks Completed: 1 (Failed: 0, Cancelled 0), Incomplete: 1, Skipped: 1",
"reason": "Running",
"status": "Unknown",
"type": "Succeeded"
}
],
"pipelineSpec": {
"finally": [
{
"name": "echo-message-3",
"taskSpec": {
"metadata": {},
"steps": [
{
"image": "ubuntu",
"name": "echo",
"resources": {},
"script": "#!/usr/bin/env bash\necho \"Hi!\"\n"
}
]
}
}
],
"tasks": [
{
"name": "echo-message-1",
"taskSpec": {
"metadata": {},
"results": [
{
"description": "",
"name": "message"
}
],
"steps": [
{
"image": "ubuntu",
"name": "echo",
"resources": {},
"script": "#!/usr/bin/env bash\necho -n \"HI\" | tee $(results.message.path)\n"
}
]
}
},
{
"name": "echo-message-2",
"taskSpec": {
"metadata": {},
"steps": [
{
"image": "ubuntu",
"name": "echo",
"resources": {},
"script": "#!/usr/bin/env bash\necho \"Hi!\"\n"
}
]
},
"when": [
{
"Input": "$(tasks.echo-message-1.results.message)",
"Operator": "notin",
"Values": [
"HI"
]
}
]
}
]
},
"skippedTasks": [
{
"name": "echo-message-2"
}
],
"startTime": "2020-09-11T06:46:58Z",
"taskRuns": {
"when-expression-9-echo-message-1-tdrnv": {
"pipelineTaskName": "echo-message-1",
"status": {
"completionTime": "2020-09-11T06:47:06Z",
"conditions": [
{
"lastTransitionTime": "2020-09-11T06:47:06Z",
"message": "All Steps have completed executing",
"reason": "Succeeded",
"status": "True",
"type": "Succeeded"
}
],
"podName": "when-expression-9-echo-message-1-tdrnv-pod-n2bph",
"startTime": "2020-09-11T06:46:58Z",
"steps": [
{
"container": "step-echo",
"imageID": "docker-pullable://ubuntu@sha256:31dfb10d52ce76c5ca0aa19d10b3e6424b830729e32a89a7c6eee2cda2be67a5",
"name": "echo",
"terminated": {
"containerID": "docker://68a1ac2e18c17130da737c32ee354d4ea417853897007270f1608dd96d79b1cd",
"exitCode": 0,
"finishedAt": "2020-09-11T06:47:05Z",
"message": "[{\"key\":\"message\",\"value\":\"HI\",\"resourceRef\":{},\"type\":\"TaskRunResult\"}]",
"reason": "Completed",
"startedAt": "2020-09-11T06:47:05Z"
}
}
],
"taskResults": [
{
"name": "message",
"value": "HI"
}
],
"taskSpec": {
"results": [
{
"description": "",
"name": "message"
}
],
"steps": [
{
"image": "ubuntu",
"name": "echo",
"resources": {},
"script": "#!/usr/bin/env bash\necho -n \"HI\" | tee $(results.message.path)\n"
}
]
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment