Skip to content

Commit

Permalink
Docs update(fixed links) as per review feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrapCodes committed May 25, 2021
1 parent c6196b9 commit 6626be3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions docs/pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,9 @@ If the `taskSpec` is not supported, the custom task controller should produce pr
Please take a look at the
[developer guide for custom controllers supporting `taskSpec`.](runs.md#developer-guide-for-custom-controllers-supporting-spec)

`taskSpec` support for `pipelineRun` was designed and discussed in
[TEP-0061](https://github.com/tektoncd/community/blob/main/teps/0061-allow-custom-task-to-be-embedded-in-pipeline.md)

### Specifying parameters

If a custom task supports [`parameters`](tasks.md#parameters), you can use the
Expand Down
10 changes: 5 additions & 5 deletions docs/runs.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ A `Run` definition supports the following fields:
- [`metadata`][kubernetes-overview] - Specifies the metadata that uniquely identifies the
`Run`, such as a `name`.
- [`spec`][kubernetes-overview] - Specifies the configuration for the `Run`.
- [`ref`](#specifying-the-target-custom-task-with-ref) - Specifies the type and
- [`ref`](#1-specifying-the-target-custom-task-with-ref) - Specifies the type and
(optionally) name of the custom task type to execute.
- [`spec`](#specifying-the-target-custom-task-by-embedding-its-spec) -
Embed the custom task resource spec directly in a `Run`.
- [`spec`](#2-specifying-the-target-custom-task-by-embedding-its-spec) - Embed the custom task resource spec
directly in a `Run`.
- Optional:
- [`params`](#specifying-parameters) - Specifies the desired execution
parameters for the custom task.
Expand All @@ -69,10 +69,10 @@ A `Run` definition supports the following fields:
A custom task resource's `Spec` may be directly embedded in the `Run` or it may
be referred to by a `Ref`. But, not both at the same time.

1. [Specifying the target Custom Task with ref](#specifying-the-target-custom-task-with-ref)
1. [Specifying the target Custom Task with ref](#1-specifying-the-target-custom-task-with-ref)
Referring a custom task (i.e. `Ref` ) promotes reuse of custom task definitions.

2. [Specifying the target Custom Task by embedding its spec](#specifying-the-target-custom-task-by-embedding-its-spec)
2. [Specifying the target Custom Task by embedding its spec](#2-specifying-the-target-custom-task-by-embedding-its-spec)
Embedding a custom task (i.e. `Spec` ) helps in avoiding name collisions with other users within the same namespace.
Additionally, in a pipeline with multiple embedded custom tasks, the details of entire pipeline can be fetched in a
single API request.
Expand Down
2 changes: 2 additions & 0 deletions pkg/reconciler/pipelinerun/pipelinerun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ func TestReconcile_CustomTask(t *testing.T) {
APIVersion: "example.dev/v0",
Kind: "Example",
},
Metadata: v1beta1.PipelineTaskMetadata{Labels: map[string]string{"test-label": "test"}},
Spec: runtime.RawExtension{
Raw: []byte(`{"field1":123,"field2":"value"}`),
},
Expand Down Expand Up @@ -578,6 +579,7 @@ func TestReconcile_CustomTask(t *testing.T) {
APIVersion: "example.dev/v0",
Kind: "Example",
},
Metadata: v1beta1.PipelineTaskMetadata{Labels: map[string]string{"test-label": "test"}},
Spec: runtime.RawExtension{
Raw: []byte(`{"field1":123,"field2":"value"}`),
},
Expand Down

0 comments on commit 6626be3

Please sign in to comment.