mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 06:46:26 +01:00
Workspace YAML changes 1 Workspace YAML changes 2 minor edit QE review 1 note on migration from Resources to workspaces added new section for PVC volumes and front end correction update PVC link fix review comments review comments
35 lines
1.4 KiB
Plaintext
35 lines
1.4 KiB
Plaintext
// Ths module is included in the following assembly:
|
|
//
|
|
// *openshift_pipelines/op-creating-applications-with-cicd-pipelines.adoc
|
|
|
|
[id="about-taskrun_{context}"]
|
|
= TaskRun
|
|
|
|
A _TaskRun_ instantiates a Task for execution with specific inputs, outputs, and execution parameters on a cluster. It can be invoked on its own or as part of a PipelineRun.
|
|
|
|
A Task consists of one or more Steps that execute container images, and each container image performs a specific piece of build work. A TaskRun executes the Steps in a Task in the specified order, until all Steps execute successfully or a failure occurs.
|
|
|
|
The following example shows a TaskRun that runs the `apply-manifests` Task with the relevant input parameters:
|
|
[source,yaml]
|
|
----
|
|
apiVersion: tekton.dev/v1beta1 <1>
|
|
kind: TaskRun <2>
|
|
metadata:
|
|
name: apply-manifests-taskrun <3>
|
|
spec: <4>
|
|
serviceAccountName: pipeline
|
|
taskRef: <5>
|
|
kind: Task
|
|
name: apply-manifests
|
|
workspaces: <6>
|
|
- name: source
|
|
persistentVolumeClaim:
|
|
claimName: source-pvc
|
|
----
|
|
<1> TaskRun API version `v1beta1`.
|
|
<2> Specifies the type of Kubernetes object. In this example, `TaskRun`.
|
|
<3> Unique name to identify this TaskRun.
|
|
<4> Definition of the TaskRun. For this TaskRun, the Task and the required workspace are specified.
|
|
<5> Name of the Task reference used for this TaskRun. This TaskRun executes the `apply-manifests` Task.
|
|
<6> Workspace used by the TaskRun.
|