Skip to content

Commit a03a58f

Browse files
authored
Merge pull request #38476 from sounix000/deprecation-of-home-and-workingDir-RHDEVDOCS-3244
RHDEVDOCS-3244 Notes on deprecation of HOME and workingDir in steps
2 parents 597c362 + 2c98b71 commit a03a58f

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

modules/op-about-tasks.adoc

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
[id="about-tasks_{context}"]
66
= Tasks
77

8-
_Tasks_ are the building blocks of a Pipeline and consists of sequentially executed steps. It is essentially a function of inputs and outputs. A Task can run individually or as a part of the pipeline. Tasks are reusable and can be used in multiple Pipelines.
8+
_Tasks_ are the building blocks of a pipeline and consists of sequentially executed steps. It is essentially a function of inputs and outputs. A task can run individually or as a part of the pipeline. Tasks are reusable and can be used in multiple Pipelines.
99

10-
_Steps_ are a series of commands that are sequentially executed by the Task and achieve a specific goal, such as building an image. Every Task runs as a pod, and each Step runs as a container within that pod. Because Steps run within the same pod, they can access the same volumes for caching files, config maps, and secrets.
10+
_Steps_ are a series of commands that are sequentially executed by the task and achieve a specific goal, such as building an image. Every task runs as a pod, and each step runs as a container within that pod. Because steps run within the same pod, they can access the same volumes for caching files, config maps, and secrets.
1111

12-
The following example shows the `apply-manifests` Task.
12+
The following example shows the `apply-manifests` task.
1313

1414
[source,yaml]
1515
----
@@ -36,9 +36,27 @@ spec: <4>
3636
oc apply -f $(params.manifest_dir)
3737
echo -----------------------------------
3838
----
39-
<1> The Task API version, `v1beta1`.
39+
<1> The task API version, `v1beta1`.
4040
<2> The type of Kubernetes object, `Task`.
41-
<3> The unique name of this Task.
42-
<4> The list of parameters and Steps in the Task and the workspace used by the Task.
41+
<3> The unique name of this task.
42+
<4> The list of parameters and steps in the task and the workspace used by the task.
4343

44-
This Task starts the pod and runs a container inside that pod using the specified image to run the specified commands.
44+
This task starts the pod and runs a container inside that pod using the specified image to run the specified commands.
45+
46+
[NOTE]
47+
====
48+
Starting with {pipelines-shortname} 1.6, the following defaults from the step YAML file are removed:
49+
50+
* The `HOME` environment variable does not default to the `/tekton/home` directory
51+
* The `workingDir` field does not default to the `/workspace` directory
52+
53+
Instead, the container for the step defines the `HOME` environment variable and the `workingDir` field. However, you can override the default values by specifying the custom values in the YAML file for the step.
54+
55+
As a temporary measure, to maintain backward compatibility with the older {pipelines-shortname} versions, you can set the following fields in the `TektonConfig` custom resource definition to `false`:
56+
```
57+
spec:
58+
pipeline:
59+
disable-working-directory-overwrite: false
60+
disable-home-env-overwrite: false
61+
```
62+
====

0 commit comments

Comments
 (0)