Skip to content

Commit

Permalink
docs: rename whenexpressions to when expressions
Browse files Browse the repository at this point in the history
this commit changes references to `WhenExpressions` in documentation
to `when` expressions

we use the field `when` in the `pipelines` (expressions is not used) so
to make it less confusing to users, we need to rename

this change applies only to the documentation, it doesn't impact the code

closes #3940
closes #4098
  • Loading branch information
jerop authored and tekton-robot committed Jul 21, 2021
1 parent d51e632 commit 1a14883
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion docs/conditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 2100
-->
# Conditions

**Note:** `Conditions` are deprecated, use [WhenExpressions](pipelines.md#guard-task-execution-using-whenexpressions) instead.
**Note:** `Conditions` are deprecated, use [`when` expressions](pipelines.md#guard-task-execution-using-when-expressions) instead.

- [Overview](#overview)
- [Configuring a `Condition`](#configuring-a-condition)
Expand Down
2 changes: 1 addition & 1 deletion docs/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ being deprecated.
| [`tekton.dev/task` label on ClusterTasks](https://github.com/tektoncd/pipeline/issues/2533) | [v0.12.0](https://github.com/tektoncd/pipeline/releases/tag/v0.12.0) | Beta | January 30 2021 |
| [The `TaskRun.Status.ResourceResults.ResourceRef` field is deprecated and will be removed.](https://github.com/tektoncd/pipeline/issues/2694) | [v0.14.0](https://github.com/tektoncd/pipeline/releases/tag/v0.14.0) | Beta | April 30 2021 |
| [The `PipelineRun.Spec.ServiceAccountNames` field is deprecated and will be removed.](https://github.com/tektoncd/pipeline/issues/2614) | [v0.15.0](https://github.com/tektoncd/pipeline/releases/tag/v0.15.0) | Beta | May 15 2021 |
| [`Conditions` CRD is deprecated and will be removed. Use `WhenExpressions` instead.](https://github.com/tektoncd/community/blob/main/teps/0007-conditions-beta.md) | [v0.16.0](https://github.com/tektoncd/pipeline/releases/tag/v0.16.0) | Alpha | Nov 02 2020 |
| [`Conditions` CRD is deprecated and will be removed. Use `when` expressions instead.](https://github.com/tektoncd/community/blob/main/teps/0007-conditions-beta.md) | [v0.16.0](https://github.com/tektoncd/pipeline/releases/tag/v0.16.0) | Alpha | Nov 02 2020 |
| [The `disable-home-env-overwrite` flag will be removed](https://github.com/tektoncd/pipeline/issues/2013) | [v0.24.0](https://github.com/tektoncd/pipeline/releases/tag/v0.24.0) | Beta | February 10 2022 |
| [The `disable-working-dir-overwrite` flag will be removed](https://github.com/tektoncd/pipeline/issues/1836) | [v0.24.0](https://github.com/tektoncd/pipeline/releases/tag/v0.24.0) | Beta | February 10 2022 |
6 changes: 3 additions & 3 deletions docs/pipelineruns.md
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,9 @@ False|PipelineRunTimeout|Yes|The `PipelineRun` timed out.

When a `PipelineRun` changes status, [events](events.md#pipelineruns) are triggered accordingly.

When a `PipelineRun` has `Tasks` with [WhenExpressions](pipelines.md#guard-task-execution-using-whenexpressions):
- If the `WhenExpressions` evaluate to `true`, the `Task` is executed then the `TaskRun` and its resolved `WhenExpressions` will be listed in the `Task Runs` section of the `status` of the `PipelineRun`.
- If the `WhenExpressions` evaluate to `false`, the `Task` is skipped then its name and its resolved `WhenExpressions` will be listed in the `Skipped Tasks` section of the `status` of the `PipelineRun`.
When a `PipelineRun` has `Tasks` with [`when` expressions](pipelines.md#guard-task-execution-using-when-expressions):
- If the `when` expressions evaluate to `true`, the `Task` is executed then the `TaskRun` and its resolved `when` expressions will be listed in the `Task Runs` section of the `status` of the `PipelineRun`.
- If the `when` expressions evaluate to `false`, the `Task` is skipped then its name and its resolved `when` expressions will be listed in the `Skipped Tasks` section of the `status` of the `PipelineRun`.

```yaml
Conditions:
Expand Down
78 changes: 39 additions & 39 deletions docs/pipelines.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# `Conditions` are deprecated, use `WhenExpressions` instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-whenexpressions
# `Conditions` are deprecated, use `when` expressions instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-when-expressions
apiVersion: tekton.dev/v1alpha1
kind: Condition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# `Conditions` are deprecated, use `WhenExpressions` instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-whenexpressions
# `Conditions` are deprecated, use `when` expressions instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-when-expressions
apiVersion: tekton.dev/v1alpha1
kind: Condition
metadata:
Expand Down
4 changes: 2 additions & 2 deletions examples/v1beta1/pipelineruns/conditional-pipelinerun.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# `Conditions` are deprecated, use `WhenExpressions` instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-whenexpressions
# `Conditions` are deprecated, use `when` expressions instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-when-expressions
apiVersion: tekton.dev/v1alpha1
kind: Condition
metadata:
Expand Down
8 changes: 4 additions & 4 deletions examples/v1beta1/pipelineruns/demo-optional-resources.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# `Conditions` are deprecated, use `WhenExpressions` instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-whenexpressions
# `Conditions` are deprecated, use `when` expressions instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-when-expressions
apiVersion: tekton.dev/v1alpha1
kind: Condition
metadata:
Expand All @@ -15,8 +15,8 @@ spec:
image: alpine
script: 'test -f $(resources.git-repo.path)/$(params.path)'
---
# `Conditions` are deprecated, use `WhenExpressions` instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-whenexpressions
# `Conditions` are deprecated, use `when` expressions instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-when-expressions
apiVersion: tekton.dev/v1alpha1
kind: Condition
metadata:
Expand Down
4 changes: 2 additions & 2 deletions examples/v1beta1/pipelineruns/pipeline-result-conditions.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# `Conditions` are deprecated, use `WhenExpressions` instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-whenexpressions
# `Conditions` are deprecated, use `when` expressions instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-when-expressions
apiVersion: tekton.dev/v1alpha1
kind: Condition
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ spec:
- |
ls -al $(resources.inputs.pipeline-git.path)
---
# `Conditions` are deprecated, use `WhenExpressions` instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-whenexpressions
# `Conditions` are deprecated, use `when` expressions instead
# https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#guard-task-execution-using-when-expressions
apiVersion: tekton.dev/v1alpha1
kind: Condition
metadata:
Expand Down

0 comments on commit 1a14883

Please sign in to comment.