You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We now support remote tasks on remote Pipeline, allowing to share
a remote Pipeline across multiple repositories.
User can override tasks from the remote pipeline by adding a task with
the same name.
Signed-off-by: Chmouel Boudjnah <[email protected]>
and the Pipeline referenced by the `pipelinesascode.tekton.dev/pipeline` annotation
216
+
in "<https://git.provider/raw/pipeline.yaml>" contains those annotations:
217
+
218
+
```yaml
219
+
kind: Pipeline
220
+
metadata:
221
+
annotations:
222
+
pipelinesascode.tekton.dev/task: "git-clone"
223
+
```
224
+
225
+
In this case if the `my-git-clone-task.yaml` file in the root directory is a
226
+
task named `git-clone` it will be used instead of the `git-clone` on the remote
227
+
pipeline that is coming from the Tekon Hub.
188
228
189
229
{{< hint info >}}
190
-
[Tekton Hub](https://hub.tekton.dev) doesn't currently have support for `Pipeline`.
230
+
Task overriding is only supported for tasks that are referenced by a `taskRef`
231
+
to a `Name`, no override is done on `Tasks` embedded with a `taskSpec`. See
232
+
[Tekton documentation](https://tekton.dev/docs/pipelines/pipelines/#adding-tasks-to-the-pipeline) for the differences between `taskRef` and `taskSpec`:
191
233
{{< /hint >}}
234
+
235
+
### Tasks or Pipelines Precedence
236
+
237
+
From where tasks or pipelines of the same name takes precedence?
238
+
239
+
for remote Tasks, when you have a `taskRef` on a task name, pac will try to find the task in this order:
240
+
241
+
1. A task matched from the PipelineRun annotations
242
+
2. A task matched from the remote Pipeline annotations
243
+
3. A task matched fetched from the Tekton directory
244
+
(the tasks from the `.tekton` directory and its subdirs are automatically included)
245
+
246
+
for remote Pipelines referenced on a `pipelineRef`, pac will try to match a
247
+
pipeline in this order:
248
+
249
+
1. Pipeline from the PipelineRun annotations
250
+
2. Pipeline from the Tekton directory (pipelines are automatically fetched from
0 commit comments