Skip to content

Instantly share code, notes, and snippets.

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

kubectl get pr pipelinerun-without-taskspec-to-echo-good-morning -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\":\"pipelinerun-without-taskspec-to-echo-good-morning\",\"namespace\":\"default\"},\"spec\":{\"pipelineSpec\":{\"tasks\":[{\"name\":\"echo-good-morning\",\"taskRef\":{\"name\":\"task-echo-good-morning\"}}]}}}\n"
        },
        "creationTimestamp": "2020-06-08T22:39:55Z",
        "generation": 1,
        "labels": {
            "tekton.dev/pipeline": "pipelinerun-without-taskspec-to-echo-good-morning"
        },
        "name": "pipelinerun-without-taskspec-to-echo-good-morning",
        "namespace": "default",
        "resourceVersion": "4237967",
        "selfLink": "/apis/tekton.dev/v1beta1/namespaces/default/pipelineruns/pipelinerun-without-taskspec-to-echo-good-morning",
        "uid": "5bff1360-ee6f-474b-be82-edd360ff485b"
    },
    "spec": {
        "pipelineSpec": {
            "tasks": [
                {
                    "name": "echo-good-morning",
                    "taskRef": {
                        "kind": "Task",
                        "name": "task-echo-good-morning"
                    }
                }
            ]
        },
        "timeout": "1h0m0s"
    },
    "status": {
        "completionTime": "2020-06-08T22:40:01Z",
        "conditions": [
            {
                "lastTransitionTime": "2020-06-08T22:40:01Z",
                "message": "Tasks Completed: 1, Skipped: 0",
                "reason": "Succeeded",
                "status": "True",
                "type": "Succeeded"
            }
        ],
        "pipelineSpec": {
            "tasks": [
                {
                    "name": "echo-good-morning",
                    "taskRef": {
                        "kind": "Task",
                        "name": "task-echo-good-morning"
                    }
                }
            ]
        },
        "startTime": "2020-06-08T22:39:55Z",
        "taskRuns": {
            "pipelinerun-without-taskspec-to-echo-good-morning-echo-go-gv86m": {
                "pipelineTaskName": "echo-good-morning",
                "status": {
                    "completionTime": "2020-06-08T22:40:01Z",
                    "conditions": [
                        {
                            "lastTransitionTime": "2020-06-08T22:40:01Z",
                            "message": "All Steps have completed executing",
                            "reason": "Succeeded",
                            "status": "True",
                            "type": "Succeeded"
                        }
                    ],
                    "podName": "pipelinerun-without-taskspec-to-echo-good-morning-echo-go-l8977",
                    "startTime": "2020-06-08T22:39:55Z",
                    "steps": [
                        {
                            "container": "step-echo",
                            "imageID": "docker-pullable://ubuntu@sha256:747d2dbbaaee995098c9792d99bd333c6783ce56150d1b11e333bbceed5c54d7",
                            "name": "echo",
                            "terminated": {
                                "containerID": "docker://d9988007f38de483fcfd53b11fc3fcb60320f1bec02ef498ab116cbaafb6cc1f",
                                "exitCode": 0,
                                "finishedAt": "2020-06-08T22:40:01Z",
                                "reason": "Completed",
                                "startedAt": "2020-06-08T22:40:01Z"
                            }
                        }
                    ],
                    "taskSpec": {
                        "steps": [
                            {
                                "image": "ubuntu",
                                "name": "echo",
                                "resources": {},
                                "script": "#!/usr/bin/env bash\necho \"Good Morning!\"  \n"
                            }
                        ]
                    }
                }
            }
        }
    }
}

@pritidesai
Copy link
Author

kubectl get tasks task-echo-good-morning -o json
{
    "apiVersion": "tekton.dev/v1beta1",
    "kind": "Task",
    "metadata": {
        "annotations": {
            "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"tekton.dev/v1beta1\",\"kind\":\"Task\",\"metadata\":{\"annotations\":{},\"name\":\"task-echo-good-morning\",\"namespace\":\"default\"},\"spec\":{\"steps\":[{\"image\":\"ubuntu\",\"name\":\"echo\",\"script\":\"#!/usr/bin/env bash\\necho \\\"Good Morning!\\\"  \\n\"}]}}\n"
        },
        "creationTimestamp": "2020-06-08T22:39:55Z",
        "generation": 1,
        "name": "task-echo-good-morning",
        "namespace": "default",
        "resourceVersion": "4237913",
        "selfLink": "/apis/tekton.dev/v1beta1/namespaces/default/tasks/task-echo-good-morning",
        "uid": "c6ac5b5e-948b-413d-aadc-ace32954bf1d"
    },
    "spec": {
        "steps": [
            {
                "image": "ubuntu",
                "name": "echo",
                "resources": {},
                "script": "#!/usr/bin/env bash\necho \"Good Morning!\"  \n"
            }
        ]
    }
}

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