diff --git a/content/en/docs/Getting Started/pipelines.md b/content/en/docs/Getting Started/pipelines.md index edabe34c..d8152644 100644 --- a/content/en/docs/Getting Started/pipelines.md +++ b/content/en/docs/Getting Started/pipelines.md @@ -1,32 +1,33 @@ + This tutorial shows you how to: -- Create two tasks. -- Create a pipeline containing your tasks. -- Use `PipelineRun` to instantiate and run the pipeline containing your tasks. ++ Create two Tasks. ++ Create a Pipeline containing your Tasks. ++ Use `PipelineRun` to instantiate and run the Pipeline containing your Tasks. For this tutorial we are going to use [minikube][minikube] to run the commands locally. ## Prerequisites -- Complete the [Getting started with tasks](/docs/getting-started/tasks/) - tutorial. *Do not clean up your resources*, skip the last section. +1. Complete the [Getting started with Tasks](/docs/getting-started/tasks/) + tutorial. *Do not clean up your resources*, skip the last section. -- [Install the Tekton CLI](/docs/cli/). +1. [Install `tkn`, the Tekton CLI](/docs/cli/). -## Creating and running a second task +## Create and run a second Task -You already have a *Hello World!* task. To create a second *Goodbye World!* -task: +You already have a *Hello World!* Task. To create a second *Goodbye World!* +Task: 1. Create a new file named `goodbye-world.yaml` and add the following content: @@ -45,22 +46,22 @@ task: echo "Goodbye World!" ``` -1. Apply your task file: +1. Apply your Task file: ```bash kubectl apply --filename goodbye-world.yaml ``` -When a task is part of a pipeline you don't have to instantiate it, the pipeline +When a Task is part of a Pipeline you don't have to instantiate it, the Pipeline is going to take care of that. -## Creating and running a pipeline +## Create and run a Pipeline -A **[pipeline](/docs/pipelines/pipelines/)** defines an ordered series of tasks +A **[Pipeline](/docs/pipelines/pipelines/)** defines an ordered series of Tasks arranged in a specific execution order as part of your CI/CD workflow. -In this section you are going to create your first pipeline, that will include -both the *Hello World!* and *Goodbye World!* tasks. +In this section you are going to create your first Pipeline, that will include +both the *Hello World!* and *Goodbye World!* Tasks. 1. Create a new file named `hello-goodbye-pipeline.yaml` and add the following content: @@ -82,13 +83,13 @@ both the *Hello World!* and *Goodbye World!* tasks. name: goodbye ``` -1. Apply your pipeline configuration to your cluster: +1. Apply your Pipeline configuration to your cluster: ```bash kubectl apply --filename hello-goodbye-pipeline.yaml ``` -1. Instantiate your pipeline with a `PipelineRun` object. Create a new file +1. Instantiate your Pipeline with a `PipelineRun` object. Create a new file named `hello-goodbye-pipeline-run.yaml` with the following content: ```yaml @@ -101,7 +102,7 @@ both the *Hello World!* and *Goodbye World!* tasks. name: hello-goodbye ``` -1. Start your pipeline by applying the `PipelineRun` configuration to your +1. Start your Pipeline by applying the `PipelineRun` configuration to your cluster: ```bash @@ -114,7 +115,7 @@ both the *Hello World!* and *Goodbye World!* tasks. pipelinerun.tekton.dev/hello-goodbye-run created ``` - Tekton now starts running your pipeline. + Tekton now starts running your Pipeline. 1. To see the logs of the `PipelineRun`, use the following command: diff --git a/content/en/docs/Getting Started/tasks.md b/content/en/docs/Getting Started/tasks.md index f722f47a..31a15930 100644 --- a/content/en/docs/Getting Started/tasks.md +++ b/content/en/docs/Getting Started/tasks.md @@ -1,23 +1,26 @@ + This tutorial shows you how to 1. Create a Kubernetes cluster with [minikube](https://minikube.sigs.k8s.io/). 1. Install Tekton pipelines. -1. Create a task. -1. Use `TaskRun` to instantiate and run your task. +1. Create a Task. +1. Use `TaskRun` to instantiate and run your Task. ## Prerequisites 1. [Install minikube](https://minikube.sigs.k8s.io/docs/start/). You only have to complete the step 1, "Installation". -1. [Install kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) + +1. [Install kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl). ## Create your Kubernetes cluster @@ -78,20 +81,32 @@ To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. ```bash kubectl get pods --namespace tekton-pipelines --watch ``` +When both `tekton-pipelines-controller` and `tekton-pipelines-webhook` show +`1/1` under the `READY` column, you are ready to continue. For example: -When all components show `Running` under the `STATUS` column the installation -is complete. +```bash +$ kubectl get pods --namespace tekton-pipelines --watch + +NAME READY STATUS RESTARTS AGE +tekton-pipelines-controller-6d989cc968-j57cs 0/1 Pending 0 3s +tekton-pipelines-webhook-69744499d9-t58s5 0/1 ContainerCreating 0 3s +tekton-pipelines-controller-6d989cc968-j57cs 0/1 ContainerCreating 0 3s +tekton-pipelines-controller-6d989cc968-j57cs 0/1 Running 0 5s +tekton-pipelines-webhook-69744499d9-t58s5 0/1 Running 0 6s +tekton-pipelines-controller-6d989cc968-j57cs 1/1 Running 0 10s +tekton-pipelines-webhook-69744499d9-t58s5 1/1 Running 0 20s +``` Hit *Ctrl + C* to stop monitoring. -## Create and run a basic task +## Create and run a basic Task -A **task**, represented in the API as an object of kind `Task`, defines a -series of **steps** that run sequentially to perform logic that the task -requires. Every task runs as a pod on your Kubernetes cluster, with each step +A **Task**, represented in the API as an object of kind `Task`, defines a +series of **Steps** that run sequentially to perform logic that the Task +requires. Every Task runs as a pod on your Kubernetes cluster, with each step running in its own container. -1. To create a task, open your favorite editor and create a file named +1. To create a Task, open your favorite editor and create a file named `hello-world.yaml` with the following content: ```yaml @@ -117,13 +132,13 @@ running in its own container. kubectl apply --filename hello-world.yaml ``` - The output confirms that the task was completed successfully. + The output confirms that the Task was completed successfully. ```bash task.tekton.dev/hello created ``` -1. To run this task, you must instantiate it using `TaskRun`. Create another +1. To run this Task, you must instantiate it using `TaskRun`. Create another file named `hello-world-run.yaml` with the following content: ```yaml @@ -136,7 +151,7 @@ running in its own container. name: hello ``` -1. Apply the changes to your cluster to launch the task: +1. Apply the changes to your cluster to launch the Task: ```bash kubectl apply --filename hello-world-run.yaml @@ -148,7 +163,7 @@ running in its own container. kubectl get taskrun hello-task-run ``` - The output of this command shows the status of the task + The output of this command shows the status of the Task
NAME SUCCEEDED REASON STARTTIME COMPLETIONTIME