Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
imjasonh authored and tekton-robot committed Jul 11, 2019
1 parent ccf1048 commit eaab928
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions docs/migrating-from-knative-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ Pipeline, and provide additional flexibility and reusability.

## Important differences

* All `steps` must have a `name`. Step statuses are not reported in a
TaskRun's `status` in the same order they're specified in the `spec`, so the
`name` is used to associate the `status` with the step.
* All `steps` must have a `name`.

* BuildTemplaate `parameters` are moved inside Task's `input.params` field, and
parameter placeholder strings (e.g., `${FOO}`) must be specified like
`${input.parameters.FOO}`.
* BuildTemplate
[`parameters`](https://github.com/tektoncd/pipeline/blob/master/docs/tasks.md#parameters)
are moved inside Task's `input.params` field, and parameter placeholder
strings (e.g., `${FOO}`) must be specified like `${input.parameters.FOO}`.

* Tasks must specify `input.resources` if they need to operate on a resource
(e.g., source from a Git repo). BuildTemplates did not specify input
resource requirements, and just assumed whatever source was available.
* Tasks must specify
[`input.resources`](https://github.com/tektoncd/pipeline/blob/master/docs/tasks.md#input-resources)
if they need to operate on a resource (e.g., source from a Git repo).
BuildTemplates did not specify input resource requirements, and just assumed
whatever source was available.

* Input resources must specify a `name`, which is the directory within
`/workspace` where the resource's source will be placed. So if you specify a
Expand All @@ -36,16 +37,20 @@ Pipeline, and provide additional flexibility and reusability.
resources are
mounted](https://github.com/tektoncd/pipeline/blob/master/docs/tasks.md#controlling-where-resources-are-mounted)
for more information.
* TaskRuns which specify a PipelineResource to satisfy a Task's
`input.resources` can do so either by referencing an existing
PipelineResource resource in its `resourceRef`, or by fully specifying the
resource in its `resourceSpec`.

* TaskRuns which specify a PipelineResource to satisfy a Task's `input.resources`
can do so either by referencing an existing PipelineResource resource in its
`resourceRef`, or by fully specifying the resource in its
[`resourceSpec`](https://github.com/tektoncd/pipeline/blob/master/docs/taskruns.md#providing-resources).

* Because of how steps are serialized without relying on init containers, steps
must specify a `command`. This field can be a list of strings, so instead of
specifying `args: ['foo', 'bar']` and assuming the image's entrypoint (e.g.,
`/bin/entrypoint`) as before, you can specify `command: ['/bin/entrypoint',
'foo, bar']`
should specify a `command` instead of
[`entrypoint`](https://github.com/tektoncd/pipeline/blob/master/docs/container-contract.md#entrypoint)
and `args`. If the image's `entrypoint` isn't defined, Tekton will attempt
to determine the image's entrypoint. This field can be a list of strings,
so instead of specifying `args: ['foo', 'bar']` and assuming the image's
entrypoint (e.g., `/bin/entrypoint`) as before, you can specify
`command: ['/bin/entrypoint', 'foo, bar']`.

## Example

Expand Down

0 comments on commit eaab928

Please sign in to comment.