Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pritidesai/b4b4a23ad19f79ec45c69eddfb0c487b to your computer and use it in GitHub Desktop.
Save pritidesai/b4b4a23ad19f79ec45c69eddfb0c487b to your computer and use it in GitHub Desktop.
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: pipelinerun-with-taskspec-to-echo-good-morning
spec:
pipelineSpec:
tasks:
- name: echo-good-morning
taskSpec:
steps:
- name: echo
image: ubuntu
script: |
#!/usr/bin/env bash
echo "Good Morning!"
@pritidesai
Copy link
Author

 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-with-taskspec-to-echo-good-morning\",\"namespace\":\"default\"},\"spec\":{\"pipelineSpec\":{\"tasks\":[{\"name\":\"echo-good-morning\",\"taskSpec\":{\"steps\":[{\"image\":\"ubuntu\",\"name\":\"echo\",\"script\":\"#!/usr/bin/env bash\\necho \\\"Good Morning!\\\"\\n\"}]}}]}}}\n"
                },
                "creationTimestamp": "2020-06-08T22:38:01Z",
                "generation": 1,
                "labels": {
                    "tekton.dev/pipeline": "pipelinerun-with-taskspec-to-echo-good-morning"
                },
                "name": "pipelinerun-with-taskspec-to-echo-good-morning",
                "namespace": "default",
                "resourceVersion": "4237776",
                "selfLink": "/apis/tekton.dev/v1beta1/namespaces/default/pipelineruns/pipelinerun-with-taskspec-to-echo-good-morning",
                "uid": "ef9189f4-213f-4c52-837b-9fa7c439db02"
            },
            "spec": {
                "pipelineSpec": {
                    "tasks": [
                        {
                            "name": "echo-good-morning",
                            "taskSpec": {
                                "steps": [
                                    {
                                        "image": "ubuntu",
                                        "name": "echo",
                                        "resources": {},
                                        "script": "#!/usr/bin/env bash\necho \"Good Morning!\"\n"
                                    }
                                ]
                            }
                        }
                    ]
                },
                "timeout": "1h0m0s"
            },
            "status": {
                "completionTime": "2020-06-08T22:38:11Z",
                "conditions": [
                    {
                        "lastTransitionTime": "2020-06-08T22:38:11Z",
                        "message": "Tasks Completed: 1, Skipped: 0",
                        "reason": "Succeeded",
                        "status": "True",
                        "type": "Succeeded"
                    }
                ],
                "pipelineSpec": {
                    "tasks": [
                        {
                            "name": "echo-good-morning",
                            "taskSpec": {
                                "steps": [
                                    {
                                        "image": "ubuntu",
                                        "name": "echo",
                                        "resources": {},
                                        "script": "#!/usr/bin/env bash\necho \"Good Morning!\"\n"
                                    }
                                ]
                            }
                        }
                    ]
                },
                "startTime": "2020-06-08T22:38:02Z",
                "taskRuns": {
                    "pipelinerun-with-taskspec-to-echo-good-morning-echo-good--26kq4": {
                        "pipelineTaskName": "echo-good-morning",
                        "status": {
                            "completionTime": "2020-06-08T22:38:11Z",
                            "conditions": [
                                {
                                    "lastTransitionTime": "2020-06-08T22:38:11Z",
                                    "message": "All Steps have completed executing",
                                    "reason": "Succeeded",
                                    "status": "True",
                                    "type": "Succeeded"
                                }
                            ],
                            "podName": "pipelinerun-with-taskspec-to-echo-good-morning-echo-good--bq4bc",
                            "startTime": "2020-06-08T22:38:02Z",
                            "steps": [
                                {
                                    "container": "step-echo",
                                    "imageID": "docker-pullable://ubuntu@sha256:747d2dbbaaee995098c9792d99bd333c6783ce56150d1b11e333bbceed5c54d7",
                                    "name": "echo",
                                    "terminated": {
                                        "containerID": "docker://b72d3d75e0a2232ee45579b503490a6688a0ee911fb26e0e810c445d26715470",
                                        "exitCode": 0,
                                        "finishedAt": "2020-06-08T22:38:10Z",
                                        "reason": "Completed",
                                        "startedAt": "2020-06-08T22:38:10Z"
                                    }
                                }
                            ],
                            "taskSpec": {
                                "steps": [
                                    {
                                        "image": "ubuntu",
                                        "name": "echo",
                                        "resources": {},
                                        "script": "#!/usr/bin/env bash\necho \"Good Morning!\"\n"
                                    }
                                ]
                            }
                        }
                    }
                }
            }
        }
    ],
    "kind": "List",
    "metadata": {
        "resourceVersion": "",
        "selfLink": ""
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment