Skip to content

Commit

Permalink
Editorial review
Browse files Browse the repository at this point in the history
Based on feedback, this commit:

-  Explicitly mention in the installation instructions that `tkn` is the
   command name of the Tekton CLI.

-  Provide a better description of when the installation of Tekton
   Pipelines is complete. Namely, when both tekton-pipelines-controller
   and tekton-pipelines-webhook are `READY`.

-  Consistent capitalization of "Task", "TaskRun", "Pipeline",
   "PipelineRun", "Workspace", and "Step". Since these are first class
   objects with a specific meaning meaning within Tekton, we treat them
   as nouns when writing docs.
  • Loading branch information
geriom authored and tekton-robot committed Jul 27, 2022
1 parent 5f0df0d commit 3d32a32
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 36 deletions.
43 changes: 22 additions & 21 deletions content/en/docs/Getting Started/pipelines.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
<!--
---
title: "Getting Started with Pipelines"
linkTitle: "Getting Started with Pipelines"
weight: 2
description: >
Create and run your first Tekton pipeline
Create and run your first Tekton Pipeline
---
-->

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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:

Expand Down
45 changes: 30 additions & 15 deletions content/en/docs/Getting Started/tasks.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
<!--
---
title: "Getting started with Tasks"
likTitle: "Tasks"
weight: 1
description: >
Set up and run your first Tekton task
Set up and run your first Tekton Task
---
!-->

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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

<pre>
NAME SUCCEEDED REASON STARTTIME COMPLETIONTIME
Expand Down

0 comments on commit 3d32a32

Please sign in to comment.